Introduction: Walter the Microbot Bot Basic Movement
We will be programming Walter the Micro:Bot.
Supplies
- Micro:Bot
- Computer
- You!
Step 1:
This is a video tutorial of how to write the program but you can also choose to just follow the step by step procedures.
Step 2:
Go to makecode.microbit.org
Step 3:
Create a new project.
Step 4:
Click on advanced.
Step 5:
Click on Extensions.
Step 6:
Click On Servo which is on the right with the bright green background.
Step 7:
A tab should appear saying Servos.
Step 8:
Right click on start and then click on delete block.
Step 9:
Click on the logic tab and select the piece that I have highlighted.
Step 10:
Drag the box and drop it into the forever box and it should snap.
Step 11:
Next click on the input tab and select the block I have highlighted.
Step 12:
Drag the box and snap it to the if then statement.
Step 13:
Click on the plus sign 2 times so that it matches the final picture.
Step 14:
Using the input tab add more button presses like we did before.
Step 15:
Next click on the servo tab and select the continuous servo function which I highlighted.
Step 16:
Drag the continuous servo function under the if statement like I did.
Step 17:
Repeat this process for the else if statements so that your blocks match mine.
Step 18:
Click on the servos tab again and select stop servo which I have highlighted.
Step 19:
Put to stop servo commands under the else statement.
Step 20:
Click on the A and select A+B. When we are done programming pressing A and B at the same time Walter will move forward.
Step 21:
Change the first else if statement to button B.
Step 22:
Click on the second block of each command that's labeled P0.
Step 23:
Change every other P0 to P2 so that your code matches mine. P0 is the back left motor and P2 is the back right motor.
Step 24:
Next we are going to change the power and direction of the motors so they work together.
Step 25:
Your power values should match the code.