7.a. About Line Following

Pololu 3pi robot on a 3/4" black line.

Now that you have learned how to compile a simple program for the 3pi, it’s time to teach your robot do something more complicated. In this example project, we’ll show you how to make your 3pi follow a black line on a white background, by coordinating its sensors and motors. Line following is a great introduction to robot programming, and it makes a great contest: it’s easy to build a line-following course, the rules are simple to understand, and it’s not hard to program your 3pi to follow a line. Optimizing your program to make your 3pi zoom down the line at the highest speed possible, however, is a challenge that can introduce you to some advanced programming concepts.

A great looking line following course can be constructed for a few dollars in a couple of hours at home. For information on building your own course, see our tutorial on Building Line Following and Line Maze Courses.