August 2010
Intermediate to advanced
288 pages
13h 21m
English
The first enhancement will address the flexibility requirement. The LineFollower program shown in Figure 18-1 uses hard-coded values, meaning the trigger values for the Light Sensor are set in the program and can’t easily be changed. The settings work fine with my NXT using the LEGO test pad, with the lighting in my office, but they may not work as well with a different Light Sensor, line, or different lighting. To avoid hard-coding the trigger values, you can write a program that collects the information needed to determine the trigger values. This makes the line-following program more flexible because it can adapt to different sensors, lines, and lighting conditions.
Since you’re using a dark line on a light ...
Read now
Unlock full access