Skip to content

mBot Instructor's Guide

  1. Try not to drop the robots or step on them
  2. Warn the students that it is easy to drive off the tables
  3. All labs that use the motors should be done on the floor
  4. Avoid remote control lab early in the learning session. Kids just drive around and, although they have fun, they don't learn much computer science. Keep them as a fun reward if they reach a stretch goal.

There are several concepts that we want to teach in these labs:

  1. Block Programming - this is just like Scratch programming but there are additional block for controlling the robot.
  2. Events - each key press on the keyboard can be different events and they can run different programs
  3. Loops - the forever and repeat blocks
  4. Conditionals - the if then block is ideal for checking the ping sensor
  5. Reading sensors - We used the ultrasonic sensor on the front of the mBot as a way to read sensor values.
  6. Functions - We can create abstractions for "drive in a circle" and "drive in a square" by putting them in new blocks.

The mBot Default Programs

When you first turn on the mBot they are in one of three "demo" programs:

  1. Remote control (White) - use the forward, back, left and right buttons on the remote and change the speed with the number_modes
  2. Collision avoidance (Green)
  3. line following - Note: no PC is needed for these modes.

Just the mBots and batteries! Each box has a figure 8 course. If we have a white table-top you can put down black tape

Connecting mobile devices to your PC

We use the 2.4GHz dongle and the green circle must be on the mBot blocks after you run the Connect/2.4Ghz menu.

Some teaching strategies

  1. try to keep the initial labs simple
  2. introduce one simple concept at a time
  3. constantly ask the students for their own ideas of what they want to change. Younger kids want to change colors. Repetition helps them learn and remember.
  4. try to keep the robots on the desk using the LED labs to start. Keep the motor labs for later in the session
  5. Avoid the sound labs if the room is too noisy

Here are some "mBot" challenges:

Not all students want to follow step-by-step instructions. For these students, just give them a list of challenges and see if they can figure them out the programs themselves.

  1. Make the LED on the top of the mBot turn red when you hit the spacebar and off when you hit the "o" key
  2. Make the LED blink continuously using the forever loop - change the speed of the blinking
  3. Make the color change when you move your hand closer to the mbot
  4. Bind the forward, back, left and right to the arrow keys
  5. Make the robot drive a single square
  6. Make the robot dance - pick a random direction to turn and a random distance to move
  7. Make the robot go forward unless there is an object in front. Then turn. (Collision avoidance)