14. case 06 Remote Control

14.1. Our Goal


  • Using another micro:bit control the ring:bit car.

14.2. Requiered Materials


  • 1 x Ring:bit Car

  • 1 x micro:bit

14.3. Background

What is wireless ?


  • Wireless technology sends message by radio wave because changes of electricity will generate waves. We can use this to load the message to the wave. Variation of electromagnetic field will generate the electricity when the electromagnetic is arrving the receiver. Then, to extract the message from wave by demodulation to send the message.

14.4. Hardware Connect


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

14.5. Software


makecode Online block codinghttps://makecode.microbit.org/#

14.6. Coding


Step 1

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

../../_images/2qCyzQ71.png

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

../../_images/1Wq2Mov1.jpg

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.

Remote Control Coding

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

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

---

Ring:bit car Coding

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

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

---

14.7. Result


  • Press the button A, the car turns left; press the button B, the car turns right; press the button A and B together, the car reverses.

14.8. Think


  • How can you control running speed of the car in a remote distance?

14.9. Questions


14.10. More Information