In this initial activity, students recreate the functionality of Mode A–Manual Drive of the Default Program. Students are given a quick introduction to mBlock programing as they create their first program. Students learn how to control mBot with the IR Remote Control as well as how to turn on the LEDs. In the following activities in this module, students reuse and build upon these programs.
In this activity, students recreate the functionality of Mode B–Obstacle Avoidance of the Default Program. Students learn how to read data from the Ultrasonic Sensor in order to measure a distance, control the frequency of a sound from the mBot Buzzer, and trigger the program to autonomously avoid obstacles. Students frequently use the Ultrasonic Sensor in other activities, so we highly recommend doing this activity before attempting later activities.
In this activity, students recreate the functionality of Mode C–Line Following of the Default Program. Students learn how to read data from the Line-Follower Sensor and use that data to guide mBot’s motion. During this activity, students build and try two different types of line-following programs in addition to testing mBot on courses of varying design.
During this activity, students explore two safety features found in many modern vehicles, Forward Collision Warning and Automatic Emergency Braking. Students replicate these safety features with mBot taking advantage of the Ultrasonic Sensor. Additionally, students use the Line-Follower Sensor in an obstacle-avoidance program, which makes it possible for mBot to detect cliffs and respond accordingly. To simulate safety features during nighttime driving, students learn to use the Light Sensor to control the speed of mBot.
During this activity, students explore one of the more popular safety features found in cars today, cruise control. Students use the Ultrasonic Sensor and the Line-Follower Sensor simultaneously to simulate Adaptive Cruise Control. Students also learn how to use subroutines to simplify their programs.
Driving Outside the Lines
During this activity, students learn to navigate their mBot using dead reckoning; in other words, using time to measure and predict distance traveled and degrees turned. Students calculate the driving speed and turning rate of their mBots. They then use those values to create a program for mBot that allows mBot to drive in a path the shape of the letter M. Additionally, students learn how to use mBlock “timer” block in place of a “wait” block.
Security and Emergency Systems
In this activity, students simulate various security and emergency systems using different sensors and devices on mBot:
- A car alarm (triggered by the Line-Follower Sensor)
- A security system (requires a “keyless entry” code be entered on the IR Remote Control)
- The sirens and warning lights on an emergency vehicle (using the Buzzer and the LEDs)
Students also learn to use mBlock’s “timer” block to control code execution.
Parking and mBot-mBot Communication
During this activity, students practice their mBot programming skills by guiding mBot through various parking scenarios, including finding a parking space, parallel parking, and perpendicular parking. Additionally, students learn how to use the IR transmitter and receiver (built into mCore) to send and receive messages from one mBot to another. Students use mBot-to-mBot communication to simulate a traffic light and to prevent head-on collisions between mBots.
During this activity, students create programs that lead mBot through lane changes on a line-following course with two lanes. At first, lane changes are initiated by button presses on the IRRemote Control. Later, students add code to allow for automatic lane changes when obstacles or slow-moving objects are detected. For the final Challenge Extension, students program mBot to change lanes when a slower-moving object is detected and then automatically return to the original lane after 5 seconds.