In our lesson plans, we use the mBot, an educational robot made by Makeblock. We selected this robot because it easily connects different sensors and can be programmed using a scratch-like programming language, mBlock.
The robot is equipped with a sonar sensor on the front and a line follower sensor on the bottom, which is its default configuration.
Screenshot of a program for the robot. The software used to program the robot is called mBlock
The robot has four ports, as indicated in the top view of the robot shown below. Each of these ports has several color labels. For example, port 1 is labeled yellow, blue, and white. The color labels are important. They indicate which type of sensor can be connected to which port. For example, the right image shows sound and sonar sensors. The sound sensor is labeled with a black sticker. Therefore, this sensor can only be connected to ports 3 and 4. The sonar sensor is labeled with a yellow sticker. Therefore, sonar sensors can be attached to ports 1, 2, 3, and 4. The type of cable used to connect sensors to the robot is also depicted below.
Image pointing out the four ports on the robot to which sensors can be attached.
Left: a sound sensor (notice the black sticker). Right: a sonar sensor (notice the yellow sticker).
This image shows the cable used to connect sensors to the robot.
The robot takes 4 AA batteries. The on/off switch is indicated in the image below. The robot also has a USB port. As we will explain in upcoming guides, a USB cable is one way the robot can be programmed. However, the preferred way to connect to the robot is wirelessly (see one of the next guides).
Image pointing out the location of the on/off switch and the USB port.
Even without attaching external sensors to the robot with a cable, the robot has several inputs and outputs.
If you are curious, the image below shows the location of these devices on the robot’s main board.
If the robot is moving backward, when should it be moving forward? Or if it turns left when it should be turning right, you might have plugged into the motors in the wrong ports.
To fix this issue, follow these steps:
M1
and M2
.M1
.M2
.