Attention: Safety Recall of Vernier Go Direct Charge Station. Click to learn more.



Teaching mBot to Drive by Itself

Experiment #M2 from Coding with mBot: Self-Driving Vehicles


In this activity, students get their first experience writing code for mBot using the mBlock Blockly app. Coding movement into a program is required in many of the activities in this module. Ideally students will recognize that they can control mBot much more precisely with code than they can remotely using the Makeblock app.


  • Become familiar with the mBlock Blockly app (for iOS or Android).
  • Write an mBot program using the mBlock Blockly app.
  • Practice coding movement commands.
  • Run a program on mBot.
  • Practice troubleshooting when problems arise.

Sensors and Equipment

This experiment features the following sensors and equipment. Additional equipment may be required.

Ready to Experiment?

Ask an Expert

Get answers to your questions about how to teach this experiment with our support team.

Purchase the Lab Book

This experiment is #M2 of Coding with mBot: Self-Driving Vehicles. The experiment in the book includes student instructions as well as instructor information for set up, helpful hints, and sample graphs and data.

Learn More