+21622886281
Micro:bit

Communicate two micro:bit cards by radio

The Micro:bit is a small, programmable computer that can be used to control a wide variety of electronic devices. One of the features of the Micro:bit is its built-in radio module, which allows it to send and receive wireless signals.

The Micro:bit‘s radio module can be used for a variety of applications, including wireless communication between multiple Micro:bits, remote control of other devices, and data collection and transmission. The radio module can be controlled through the Micro:bit‘s software, allowing for easy implementation of wireless communication in projects.

The radio module uses the 2.4GHz ISM band and operates on a proprietary protocol, which allows for low-power, short-range communication. It has a range of around 100m (with line of sight).

The Micro:bit‘s radio module can be used in a variety of ways, including:

  • Wireless communication between multiple Micro:bits: Two or more Micro:bits can be programmed to communicate with each other wirelessly, allowing for the creation of distributed systems and networks.
  • Remote control of other devices: The Micro:bit can be used to remotely control other devices, such as robots or lights, using its radio module.
  • Data collection and transmission: The Micro:bit can be used to collect data, such as temperature or light level, and then transmit that data wirelessly to another device for further processing or display.

Purpose of this tutorial:

Communicating between two Micro:bit cards using the built-in radio module is relatively straightforward. Here is an overview of the process:

  1. On both Micro:bits, set up the radio module by initializing it and configuring it with the same channel and group. This can be done using the built-in radio functions in the Micro:bit’s software.
  2. On one Micro:bit, program it to send a message using the radio module’s send function. The message can be any string or number that you want to send.
  3. On the other Micro:bit, program it to receive the message using the radio module’s receive function. This function will wait for a message to be received and then store it in a variable.
  4. Once the message is received, the Micro:bit can do something with the received data, such as display it on the LED matrix or using it as a command to control something.
  5. Repeat the process in the opposite direction to have bidirectional communication.

In this tutorial we will see how to send a message from one micro:bit card to another by radio:

  • If we press the button «A», the micro:bit card sending the letter «A» by radio and the card receiving receives the message and the poster.
  • If the “B” button is pressed, the transmitting micro:bit card sends the letter “B” by radio and the receiving card receives the message and displays it.

To make this communication we need 2 micro:bit cards: one to send the message and the other to receive the message.

And here are the two makecode programs needed to send a message by radio.

Sending a message by radio

Micro:bit emitting card

Receive a radio message

Micro:bit receiver board




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top