Introduction

The radio module on the micro:bit is super useful. Information gathered by one micro:bit can be transmitted to other micro:bits in the same radio group. Which can then perform actions based on the information received.

In this tutorial, we will utilize MakeCode’s radio blocks to have one micro:bit transmit a signal to a receiving micro:bit on the same channel. Eventually, we will control a OSOYOO Robot Car wirelessly using parts from the micro:Bit Board!

Do you already have a micro:bit project you’d like to control from afar? Partner up with a friend, or grab a spare micro:bit, to make a remote controlled project with 2 micro:bits.

Preparations

Code the remote

Get the remote control micro:bit and flash on the Micro:bot Remote Code file. This code uses the x acceleration of the micro:bit to control forwards and backwards, and the A and B buttons for left and right. This code just sends numbers, so we also need to code the micro:bot to listen and respond to these numbers.

Code the OSOYOO Robot Car

Download and flash the Micro:bit Receive Code onto the micro:bit of thr OSOYOO Robot. With this code the micro:bit robot is now listening and reacting to the signals from the remote. It switches between different states according to the number that is sent.

Now that all your code is snugly tucked into your micro:bits, attach your battery packs and get going! Play around and see what other commands you can send with the A+B button, or try different kinds of inputs instead of buttons. Then remote control all your other micro:bit projects.

Things to know
Notice the “radio set group” block at the start. This is the channel the micro:bits are on, if you want to play with a friend then you’ll need to change the channel on both micro:bits so they can be controlled independently.

Try it out!
See how far away you can be and still control it! There are lots of other ways you can control with the micro:bit, try changing the inputs and see what happens!