Changing Lanes
Experiment #C9 from Coding with mBot: Self-Driving Vehicles
- Subject
- Engineering Outreach
Introduction
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.
Objectives
- Practice writing, running, and troubleshooting mBot code.
- Model real-world traffic situations with mBot.
Sensors and Equipment
This experiment features the following sensors and equipment. Additional equipment may be required.
Option 1
Option 2
Ready to Experiment?
Ask an Expert
Get answers to your questions about how to teach this experiment with our support team.
- Call toll-free: 888-837-6437
- Chat with Us
- Email support@vernier.com
Purchase the Lab Book
This experiment is #C9 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.