I was put on a project by my boss to assemble and code a robot that is able to follow a line across the facility. I have everything installed, however, I am very lost on how to go about the line tracking. I only have two DF Robot Line Tracking Sensors for Arduino. Am I supposed to have three? I am very new to this and need to get it done as soon as possible. I have everything set up with a Hercules Dual 15A 6-20V Motor Controller with a UartSBee V4 and I have four motors connected to it. I have already downloaded Arduino and have experimented with simple codes to make it move forwards and backwards. I just need to know know is how to go about the line sensors, and how to code it so that it will follow a line.
The simplest way is to use just one sensor.
If it detects white - then send the robot left & if it detects dark - then send it right
This will allow the robot to move forward albeit in a very jerky or zig-zag manner but is a good place to start. The robot is effectively following one edge of the “line” .
There are many resources accessible via google that can give you a more sophisticated algorithm but in many cases also require more sensors