Note: Update the firmware of mBot Mega to the factory version before using the preset programs. For details about firmware update, see Update the Firmware of mBot Mega.
Function switch
Press any of the impact switches for 2 seconds to switch between different preset functions. The color of the RGB LEDs indicates the current function:
Green: gesture recognition
Yellow: obstacle avoidance
Blue: line following
Gesture recognition (set as default)
- LED color: green
- Standby state: Both RGB modules are all in dark green.
- When the obstacle avoidance sensor detects an obstacle, the RGB LEDs turn bright green.
- The three obstacle avoidance modules installed on the front can detect three states within 3–10 cm:
- Swipe to the right: When the obstacle avoidance sensors 3 and 2 or sensors 2 and 1 detect signals successively, the robot moves about 10 cm to the right. When the robot moves, the RGB LEDs on the right side are lit up in bright green, and when the robot stops moving, the RGB LEDs return to dark green.
- Swipe to the left: When the obstacle avoidance sensors 1 and 2 or sensors 2 and 3 detect signals successively, the robot moves about 10 cm to the left. When the robot moves, the RGB LEDs on the left side are lit up in bright green, and when the robot stops moving, the RGB LEDs return to dark green.
- Push: When obstacle avoidance sensors 1 and 3 detect signals at the same time for more than 0.2 seconds, it is judged as a push, the left and right RGB LEDs are lit up in bright green, and the robot moves backward.
- When all the sensors fail to detect the signal, the robot stops moving and the RGB LEDs return to dark green.
Automatic obstacle avoidance
- LED color: yellow
- When no obstacle is detected, all LEDs are lit up in dark yellow.
- When any infrared sensor detects an obstacle, all LEDs are lit up in bright yellow.
- After being switched to the automatic obstacle avoidance mode, the robot moves according to the state of the three sensors:
- Move forward: When none of the three sensors detects an obstacle, the robot moves forward.
- Turn left: When the sensor on the left detects an obstacle, the robot rotates clockwise about 90 degrees.
- Turn right: When the sensor on the right detects an obstacle, the robot rotates about 90 degrees counterclockwise
- Move backward: When the middle sensor detects an obstacle, the robot moves backward about 5 cm.
Automatic line following
- LED color: blue
- When the line follower sensor does not detect a black line, the RGB LEDs are lit up in dark blue.
- When the line follower sensor detects a black line, the RGB LEDs on the corresponding side are lit up in bright blue.
- After being switched to the line following mode, the robot starts following when any line follower sensor detects a black line. If neither of the line follower sensors detects a black line, the robot rotates for 5 seconds, and starts following after a black line is detected. If no black line is detected after 5 seconds, the robot stops the movement. And then the robot starts following after a black line is detected or it is manually moved to a black line.
Comments
My mBot Mega does not seem to have any of the default programming, When switched on, the LEDs do not come on. In play mode, I can drive it, but it will not follow the line nor do obstacle avoidance.
Please sign in to leave a comment.