During this activity, students create programs that lead mBot through lane changes on a linefollowing 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.


  • Practice writing, running, and troubleshooting mBot code.
  • Model real-world traffic situations with mBot.