Program a MicroMouse. Escape the Maze.
RoboMaze is a classroom programming activity using the BBC micro:bit, Microsoft MakeCode Python and the Kitronik :MOVE Motor.
Your challenge is simple:
Write the code that allows the MicroMouse to navigate the maze by itself.
Once it enters the maze, there is no controller. Your program has to do the work.
Start the Activity Get Starter Code
Everything You Need
Instructions
Set up Microsoft MakeCode and work through the six RoboMaze tasks.
Starter Code
Copy a clean pupil template straight into the MakeCode Python editor.
Cheat Sheet
Quick reminders for variables, functions, motors, pauses and the ultrasonic sensor.
The Three Values You Will Test
The most important variables are kept together at the top of the starter code:
speed = 0
turnTime = 0
distanceToWall = 0
speed— how fast the motors run.turnTime— how long the motors run during a turn.distanceToWall— how close the MicroMouse gets to a wall before stopping.
Something Gone Horribly Wrong?
You cannot permanently break the starter program.
If your code becomes badly broken, open the Starter Code page, copy a fresh version and paste it back into MakeCode.