the FileReader program
FileReader is a very simple program that displays the contents of a file on the NXT’s screen, one value at a time. This program uses two properties of the File Access block:
All values written to the file are text values. When you write a number, the File Access block converts it to a text value before writing it to the file. The block also converts a value from text to a number when reading the file, which means that you can read all the data from a file as text values, even if some or all of the data was originally numbers.
When reading from a file, the Error value will be true when all the data has been read. To read all the values in a file, you can read the values in a loop that continues until the Error value is true. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access