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.

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

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.

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).

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.

This image shows the cable used to connect sensors to the robot.

Switches, sensors, and ports

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.

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.

  1. An onboard light sensor that can measure the amount of ambient light.
  2. A tiny speaker that can play tones
  3. Two LED lights. We can set their brightness and color.
  4. The robot has a button that can be used in programs.

If you are curious, the image below shows the location of these devices on the robot’s main board.

Untitled