10. case 01 Full speed ahead

10.1. Our Goal

  • To make the Ring:bit Car to go ahead and reverse.

10.2. Requiered Materials

  • 1 x Ring:bit Car

10.3. Hardware Connect

  • Connect the left wheel servo to P1 of the Ring:bit expansion board and the right wheel servo to P2.


10.4. Software


10.5. Coding

Step 1

  • Click on “Advanced” in the MakeCode Drawer to see more code sections.


  • Search for “ringbitcar” and click on the ring:bit car package to add it to your project. (As below picture)


Note: If you get a warning telling you some packages will be removed because of incompatibility issues, either follow the prompts or create a new project in the Project file menu.

Step 2

  • Snap the block go straight at full speed into the On start block.

  • The port number is based on the actual servo connection port. ../../_images/igG5TVD1.png

Step 3

  • Snap the go straight at full speed block into the on button A pressed block.


Step 4

  • Snap the reverse at full speed block into the on button B pressed block.



Program Link:https://makecode.microbit.org/_5md9ofDyRigh

If you don’t want to type these code by yourself, you can directly download the whole program from the link below:


10.6. Completed!

  • When button A is pressed, the car will go straight at full speed.

  • When button B is pressed, the car will reverse at full speed. ../../_images/wwV0YDe.jpg

10.7. Think

How can you make your car to stop when button A is pressed ?

10.8. Questions

10.9. More Information