In this section, we will get to know the parts we are about to use and then mount them on the robot, wiring up to the Pi.
Attaching line sensors to the robot and Raspberry Pi
What are optical line sensors?
There are a few types of sensor that can be used. One type is known as hall sensors, which can detect magnetic strips or current carrying cables. The other type are optical sensors. Basic optical line sensing bounces infrared light off of whatever is below the robot. It then detects the intensity of the reflected light.
These send a data value depending on this. The sensor we will use turns this intensity into a binary, 1 or 0, value by seeing if the detected light passes a threshold. The following photo shows the sensors...