MAKERFACTORY Robobug can start walking automatically and avoid obstacles with help of an ultrasonic sensor HC-SR04.
The Robobug tries to keep the distance of any obstacle between 10 and 20 cm. If the obstacle moves closer to the Robobug’s head, the RGB-LED turns red and the roboter moves backwards. If the obstacle moves away, the LED turns blue and the robobug will follow the obstacle until the distance is less than 20 cm again. And if the nearest obstacle’s distance is higher than 60cm, the Robobug stops walking.
PLUG IN: ¶After plugging in the power supply, the Robobug gives a melody and waits for the start signal.
START: ¶Press the button T1 on the locomotion controller board. The Robobug gets up on its feet and starts walking in a straight direction.
MEASURING: ¶The head turns frequently from left to right, so the ultrasonic sensor continuously measures the distance to all obstacles in a range of 60° (30° left and 30° right) and the RGB LED blinks in blue and green.
DETECT OBSTACLE WITH DISTANCE < 60CM: ¶The RGB LED turns red and the Robobug turns around until there is no other obstacle nearer than 90cm.
DETECT OBSTACLE WITH DISTANCE < 30CM: ¶The RGB LED turns red and the Robobug walks backwards (=escape behavior). After that, it turns around until there is no other obstacle nearer than 90cm.
Comments
Please log in or sign up to comment.