Step 3: Step 3: Assemble 2

Step 4: Step 4: Code

You can find the code at: http://ardututes.weebly.com/line-following-robot.h...When working with the code, you will need to adjust the values for the photocell and the light sensor to change directions. ...

Step 5: Step 5: Move!

This is a Line Following Robot. It follows a black line that is drawn. It is able to detect the black line through one photocell and one analog light sensor. There is an LED in between the two sensors that gives off red light when the Arduino is powered on. Then, when the light is reflected back, more light is detected when it is reflected on the white surface, compared to when it is reflected on the black surface. Using this, the right and left servo motors move accordingly to turn left or right when the sensors detect white surface rather than black. I used the Parallax BOEBot Robot for Arduino Kit as my base for the robot. Then I placed a breadboard in front of the base to attach all the sensors with the LED to face the black line.

Follow these steps, and you will be able to build your own line following robot! :)