User Manual
45
Software Flow
Considering the interference of negative environment factors, we need to calibrate the line
follower sensor before actual use.
Here two main functions including the line follower calibration and line following are included in
the main program.
Subflow of Line Follower Calibration Function
When we run the line follower configuration, we will start from white color, then black color, which
is more like the upper limit and lower limit of the sensor. Then we take the average value of black
and white as reference value: if the detected value is higher than the reference, it should be white;
if the detected is lower than the reference, it should be black. We will show the five detectors’
status by 5 elements [0,0,0,0,0].
Calibrate the
line follower
Follow line
Start
Keyboard
interrupt
Y
End
N
Run line follower
calibration function
Run line following
function