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




In this activity, students gain additional experience using an input (sensor data) to change an output (light an LED). Initially, students simply turn on the LED. Then they improve the program to control the LED with greater nuance.


  • Collect and use data to set levels in the mBot™ program.
  • Practice writing code, uploading and running a program on mBot, and troubleshooting code
    when problems arise.
  • Gain additional experience with the use of inputs and outputs.
  • Use variables.

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 #4 of Coding with mBot: Life Hacks. 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