User Manual
51
6.4 Following.ino
The infrared line following module enables the RollFlash to detect a black line through the
collected data, so that it can adjust the direction and follow the line. Meanwhile, the
RollFlash will walk away from the obstacle on a black line it's following, bypass the obstacle
and come back to follow the line.
The program above is to read the black line’s position. By comparing the AD value and the
setting reference, it can tell whether the black line is at the centre-left or centre-right position.
SunFounder