Robot Tour
In this project, you’ll learn how to build and program a robotic vehicle to navigate a track and reach a target as accurately and efficiently as possible! You’ll learn the basic MakeCode commands needed to program your vehicle to drive, turn, break, and avoid obstacles.

Prepare
You’ll need the following items to complete this project:
- Robot Tour Kit (with included Micro:bit V2)
- Computer with access to Microsoft MakeCode
Build
First, let’s build our vehicle with the building blocks and robotic components from the Robot Tour Kit:
Code
For this project, you have two options for coding. You may experiment with some completed code or follow a step-by-step tutorial to code your vehicle from scratch.
- Download
- Tutorial
Explore the code below to get started with your vehicle. Review the code comments on each block to learn about how your project works, then download the code to test it out real life.
Improve
Think about how you could modify the sample code provided, or create your own code that includes the following features to enhance your vehicle:
- Implement Advanced Obstacle Avoidance: How could you program your robot to turn left or right based on which side the obstacle is on? Could it try to find a clear path around an object instead of just stopping and turning?
- Add a Multi-Stop Tour: Modify the code to have the robot visit multiple locations in a specific order.
- Use Sound for Status Updates: Make the micro:bit play a different sound effect to indicate the robot’s status (e.g., a “beep” when it detects an obstacle, a chime when it successfully completes a turn, or a melody when it reaches its destination).
- Create a Remote Control Mode: Use a second micro:bit’s buttons to allow for manual control of the robot. Pressing a button could make it drive forward, turn, or stop, overriding the autonomous code.
Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.