Introduction: Walter the Microbot Bot Basic Movement
We will be programming Walter the Micro:Bot.
This is a video tutorial of how to write the program but you can also choose to just follow the step by step procedures.
Go to makecode.microbit.org
Create a new project.
Click on advanced.
Click on Extensions.
Click On Servo which is on the right with the bright green background.
A tab should appear saying Servos.
Right click on start and then click on delete block.
Click on the logic tab and select the piece that I have highlighted.
Drag the box and drop it into the forever box and it should snap.
Next click on the input tab and select the block I have highlighted.
Drag the box and snap it to the if then statement.
Click on the plus sign 2 times so that it matches the final picture.
Using the input tab add more button presses like we did before.
Next click on the servo tab and select the continuous servo function which I highlighted.
Drag the continuous servo function under the if statement like I did.
Repeat this process for the else if statements so that your blocks match mine.
Click on the servos tab again and select stop servo which I have highlighted.
Put to stop servo commands under the else statement.
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.
Change the first else if statement to button B.
Click on the second block of each command that's labeled P0.
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.
Next we are going to change the power and direction of the motors so they work together.
Your power values should match the code.