Monday, 11 February 2013

Files


Files

RobotC on the NXT allows for the creation, reading, writing and manipulation of data les.
Data les allow the robot to store data collected during the execution of one program to be
used during the execution of a di erent program.
For example, imagine a simple light sensor program that reads light levels every 15
minutes for a period of one day. We might start the program and leave the robot running
for a day in a room with a window. The program would store the light level measurements
in a data le and exit after one day has elapsed. Suppose that we return after a few days
and would like to see a graph of the light level readings. We turn on the NXT and run a
di erent program that is able to open the data le created by the light sensor program and
create a graph of the data. In this way, we can get an idea of what the light level readings
were like on the day the measurements were made.
Just like a hard drive or thumb drive, the typical NXT stores a collection of les. The
les on the NXT can be viewed from within RobotC using the Robot ! NXT Brick ! File
Management menu described in the RobotC On-line Support on the left side-bar under the
ROBOTC Interface ! NXT Brick Menu ! File Management section.
The File Managment list shows the names of all of the les currently on the NXT. A
typical lename has a name (up to 15 characters) and an extension (up to 3 characters)
with a period separating the two. For example, sound les end with the rso extension.
Executable program les end with the rxe extension.
There are a number of limitations on les other than the 15.3 character limit. The NXT
can only hold 64 les in total. If during a project, the 64 le limit is reached, some les
will have to be deleted before continuing. During any single program, only 16 les may be
open at any one time. Finally, there is a limit to how much information can be stored on
the NXT.

No comments:

Post a Comment