Line Follow Activity

Here is one possible solution to doing the line follow challenge.  There are many.  This one has the robot turning back in the opposite direction when it detects white.  When both bottom sensors do not detect much reflected light, it means that the line is below it, so the robot goes straight.  Line 4 of the code assumes that the robot has lost the line so in this code it is making a circle to try and re-locate the line.

Tags: