Out of the box, and before connecting your mBot to software, the mBot is set to run the Default Program. While in this state, you can have your mBot operate in the following modes:
A. Manual Drive
B. Obstacle Avoidance
C. Line Following
You can switch between these modes by pressing “A”, “B”, or “C” on the IR remote or by pressing mBot’s onboard button, located on the front of mBot’s mCore “brain”.
Note: If you have already connected your mBot to the software, your mBot is no longer in Default Program mode. Here are the steps to reload the Default Program to mBot:
1. Connect mBot to a computer with the included USB cable.
2. Open the mBlock software and connect the software to mBot by clicking on the Connect menu, choosing “Serial”, and selecting the USB port to which mBot is connected.
3. Once connected, click on the Connect menu again and choose “Reset Default Program” > “mBot”.
4. mBlock will then reload the Default Program to mBot.
It is a good practice to test mBot, while running its Default Program, after first putting mBot together and/or before using it with students.
Test Power and Connections
With the mBot loaded with the Default Program test the power to the board and the sensors.
1. Turn on the mBot.
2. The two front LEDs will flash Red/Green/Blue then off, the red PWR LED will turn on in the middle of the circuit board.
3. A small red LED on the back of the Ultrasonic Sensor will light.
4. Two small blue LEDs will light on either side of the Line-Follower Sensor (when the mBot is sitting on the table).
If the LEDS on the board and sensor are not responding correctly:
* If the PWR LED is off or dim, check the batteries.
* If the Ultrasonic Sensor LED is not lit, check the connection of your range sensor to port 3.
* If the blue LEDS of the Line-Follower Sensor are not lit, first lift the mBot in the air and then place it on white paper, tilting the front of the mBot towards and away from the paper.
* Check the connection of the Line-Follower Sensor on port 2.
* The sensor cables have plugs that connect to the mBot and to the sensor. Make sure that both plugs are properly connected.
It is easiest to test mBot’s motors using mode A-Manual Drive. Be sure the IR remote has a battery (CR2025) before running this test.
1. Hold the mBot in the air or set it on a block to keep the wheels off the surface.
2. Turn on the mBot.
3. Press remote’s “A” button. mBot will beep and LED1 and LED2 lights are lavender.
4. Press 1. This will switch mBot to the slowest speed (motors do not turn).
5. Press < (left). LED1 (left) turns green, mBot right wheel turns. 6. Press > (right). LED2 (right) turns green, mBot left wheel turns.
7. Press ^ (forward). LED1/LED2 (left/right) turns green, both wheels turn.
8. Press v (backward). LED1/LED2 (left/right) turns red, both wheels turn opposite direction.
9. Place the mBot on the ground and practice driving it around.
If a motor is not responding correctly:
* Check the motor connections.
* Make sure the batteries are good.
* Make sure the IR remote has good batteries.
* Try the sequence again, but start with a motor speed of 9 (full power).
* The motor wires may be reversed.
* The left motor (the motor that is under plugs 1 and 2) should be connected to Motor Connector M1.
Test Ultrasonic Sensor
To test the Ultrasonic Sensor, run mBot in the B-Obstacle Avoidance mode. When this program is run, the mBot will drive forward until it detects an obstacle (such as a wall) via its Ultrasonic Sensor. Then, it will back up, turn, and resume driving forward.
1. Hold the mBot in the air with nothing in front of the range sensor
2. Turn on the mBot.
3. Press the IR Remote’s “B” button. mBot will beep and LED1 and LED2 are green. mBot’s wheels will turn as if the mBot is driving forward
4. Move your hand in front of the Ultrasonic Sensor. mBot’s wheels will change direction for a moment (backward) and then return to moving forward.
5. Place the mBot on the ground and see how it responds when driving toward a solid wall or object.
If you do not see the wheels reversing when there is an object in front of the sensor:
* The Ultrasonic Sensor may not be connected. Check it’s connected to port #3.
* Make sure the cable is connected to the back of the Ultrasonic Sensor.
* Check that the Ultrasonic Sensor’s red power LED (on back of the sensor) is lit.
* The Ultrasonic Sensor may have trouble detecting an object of small or odd shape, or may have trouble detecting an object that is angled away from the front of the sensor.
Test Line-Follower Sensor
To test the line following sensor, run mBot in mode C-Line Following. When this program is run, the mBot will drive forward, following a black line on the ground. It keeps track of the black line using its line-following sensor, mounted to the front of the mBot.
1. Place the figure-8 track (that shipped with the mBot) on the ground.
2. Hold the mBot in the air.
3. Turn on the mBot.
4. Press the IR Remote’s “C” button. mBot will beep and LED1 and LED2 are blue.
5. Lower the mBot so that the line following sensor is just hovering slightly above the center of the thick black line. Both of the small, blue LEDs of the sensor should be off.
6. Slowly rotate the mBot so that the left side of the sensor is just hovering over the white paper, and the right side is still just hovering over the black line. The left, blue LED of the sensor should turn on, and the right should be off.
7. Slowly rotate the sensor so that the right side is just hovering over the white paper, and the left side is just hovering over the black line. The right, blue LED of the sensor should turn on, and the left should be off.
8. Continue to rotate the mBot so that both sides of the sensor are hovering slightly above the white paper. Both LEDs of the sensor should be on.
9. Place mBot down, on the figure-8 track. mBot will follow the line.
If mBot is unable to follow the line:
* The line following sensor may not be connected. Check it’s connected to port #2.
* Make sure the cable is connected to the back of the Line-Follower Sensor.
* Verify that the Line-Follower Sensor’s red power LED (on back of the sensor) is lit.
* Test that the motors are properly connected with sufficient battery power.
See also: mBot Troubleshooting and FAQs