Purpose
To build a car with the bricks in the kit.
Materials
5.4. Background Knowledge
Basic Knowledge of Microbit
5.5. Bricks build-up
Software
Programming
Step 1
Click “Advanced” in the MakeCode drawer to see more choices.
In order to programme for the Ring:bit Bricks Pack, we need to add an extension. Click “Extensions” at the bottom of the drawer. Search “Ringbit” in the dialogue box to download it.
Note: If you met a tip indicating codebase will be deleted due to incompatibility, you may continue as the tips tell or build a new project.
Step 2
Drag “Set left wheel connects to P1 and right wheel connects to P2” brick in “on start”, set the left wheel in connection with P1 and the right in connection with P2.
Step 3
Programme as the picture shows: while pressing button A+B, the car moves at the full speed; button A for turning to the right side at the full speed; button B for turning to the left side at its full speed; the screen faces downside for moving back at the full speed; and shake the car for stopping.
Code
Link: https://makecode.microbit.org/_4vHR21E92J0J
You can also download it directly below:
Result
While pressing button A+B, the car moves at the full speed; button A for turning to the right side at the full speed; button B for turning to the left side at its full speed; the screen faces downside for moving back at the full speed; and shake the car for stopping.