
RC CAR is a very simple robot ideal for beginner electronics. The robot travels along the line using the iR sensor. The sensor has two diodes, one diode sends infrared light, the other diode receives the reflected light from the surface. When the infrared rays fall on the white surface, they are reflected back. When infrared light fall a black surface, the light is absorbed by the black surface and no rays are reflected back, so the photodiode does not receive any light. The sensor measures the amount of reflected light and sends the value to the arduino. There is a potentiometer on the sensor, with which we can adjust the sensitivity of the sensor.
Arduino now has to make decisions based on the data received from the sensor, until the sensor detects no black line it will go forward. If the left sensor detects a black line, the robot turns right, and if the right sensor detects a black line, it turns left. The robot will stop when both sensors detect a black line at the same time.