I just found a set of posts explaining how to code a line following robot with a PID integrated algorithm. PID stands for Proportional-Integral-Derivative and it’s very useful for controlling many actions where a great level of control an prevision have to be achieved.
Here the set of posts by syclops. Great job!
links after the break.