Chapter 18. the LineFollower program

Now that you’ve seen the advanced programming features that NXT-G has to offer, it’s time to put them to use. In this chapter, I’ll walk you through the process of transforming the simple line-following program from Chapter 6 into a much more flexible and accurate program.

The chapter begins with a brief discussion on line following. Then I’ll show you how to use files and a configuration program to collect and save the settings used by the LineFollower program. In the second half of the chapter, I’ll show you how to use a more complicated control strategy for following a line. By the end of the chapter, your TriBot will be able to follow a line quickly and accurately.

following a line

Programming your robot to ...

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.