controlling the amount of data

The VerifyLightPointer program is a little unusual in that it collects and records data as fast as possible, creating a large data file in a short amount of time. The program is written this way to match the design of the LightPointer program, but for most data-logging programs, you’ll want more control over how often the program records data. Because the amount of memory you have to work with is limited, you’ll usually need to record the data less often in order to avoid running out of memory.

Most data-logging programs will be structured like the VerifyLightPointer program. After some blocks perform the initial setup, a Loop block will contain the code to collect the data and write it to a file. You can control ...

Get The Art of LEGO MINDSTORMS NXT-G Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.