Skip to Main Content
The Art of LEGO MINDSTORMS NXT-G Programming
book

The Art of LEGO MINDSTORMS NXT-G Programming

by Terry Griffin
August 2010
Intermediate to advanced content levelIntermediate to advanced
288 pages
13h 21m
English
No Starch Press
Content preview from The Art of LEGO MINDSTORMS NXT-G Programming

the starting point

As a starting point for this discussion, I’ll use the LineFollower program from Chapter 6, as shown in Figure 18-1. This program allows the TriBot to follow a line, but it works only if the robot moves slowly.

The original LineFollower program

Figure 18-1. The original LineFollower program

Although the Light Sensor is used in Figure 18-1 and in the images in this chapter, the program will work just as well with the Color Sensor. As we proceed, I’ll give instructions for using either sensor.

To follow a line, the Light Sensor (or Color Sensor) should be mounted on the front of the TriBot pointing downward, as shown in Figure 18-2.

Figure 18-2. Mounting the sensor on ...

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.
Start your free trial

You might also like

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

Terry Griffin

Publisher Resources

ISBN: 9781593272180Errata