Lego NXT Line Follower

Building a line follower with the Lego NXT kit is easy!

Fine tuning it, however, requires some skill. One of the most common algorithm is PID, or Proportional Integral Derivative.

Proportional says: Fix myself according to my present error

Integral says: Fix myself according to the sum off my past errors

Derivative says: Fix myself based on what the error is going to be.

There is a very good treatment of PID over here:

NXC source code