Below are the program sketch how to code a line following robots using Arduino, to detect Black Line & White Line when digital signal is HIGH, sensor will read black line and when digital signal is LOW, sensor will read white line.
The Sketch Code
[crayon-679c103c338f5688482701/]
Coding a Line Finder with Arduino Module Sensors for Robotics