User Manual

49
The program above is to read data from the ultrasonic. By calling this program to read the
data, we can know how far the obstacle is ahead. Then write the code that if there is an
obstacle 10cm away in the front, control the RollFlash to move back to 15cm from the
obstacle, then turn left or right to avoid it, and continue to move. Thus, the RollFlash can
realize obstacle avoiding function.
SunFounder