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.


  • Practice writing, running, and troubleshooting code.
  • Apply an understanding of the Ultrasonic and Line-Follower Sensors to mimic real-world vehicle safety features.
  • Learn how to use the mBot Light Sensor.