Most self-driving vehicles are able to detect and follow road markings. In this activity, students program mBot to use the Line-Follower Sensor to follow the edge of a black line.


  • Use the output of the Line-Follower Sensor to allow mBot to navigate autonomously by following a line.
  • Apply an understanding of the mBot Line-Follower Sensor to mimic the actions required of real-world autonomous vehicles.
  • Practice writing code and troubleshooting when problems arise.