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.


  • Practice writing, running, and troubleshooting mBot code.
  • Apply an understanding of the mBot Ultrasonic and Line-Follower Sensors to mimic realworld safety features in newer cars.
  • Learn how to simplify code by using subroutines.