Recommended for Middle School through High School.
During this activity, students learn to navigate their mBot using dead reckoning; in other words, using time to measure and predict distance traveled and degrees turned. Students calculate the driving speed and turning rate of their mBots. They then use those values to create a program for mBot that allows mBot to drive in a path the shape of the letter M. Additionally, students learn how to use mBlock "timer" block in place of a "wait" block.
- Practice writing, running, and troubleshooting mBot code.
- Determine the driving speed and turning rate of mBot.
- Apply the relationship, distance = rate × time, to determine how long to run the motors in order to make mBot move a given distance.
- Practice writing subroutines to simplify code.
- Learn how to use the "timer" block in place of the "wait" block.
Sensors and Equipment
This experiment features the following Vernier sensors and equipment.
You may also need an interface and software for data collection. What do I need for data collection?
Computer Science Teachers Association (CSTA) Standards
- Create clearly named variables that represent different data types and perform operations on their values.
- Design and iteratively develop programs that combine control structures, including nested loops and compound conditionals.
- Decompose problems and subproblems into parts to facilitate design, implementation, and review of programs.
- Create procedures with parameters to organize code and make it easier to reuse.
- Systematically test and refine programs using a range of test cases.
- Document programs in order to make them easier to follow, test, and debug.
Coding with mBot: Self-Driving Vehicles
See other experiments from the lab book.