Micro:bit Radio
For this tutorial, we used a radio link to connect two micro:bits, which enabled strings of data to be sent between devices. This used the default radio settings for ease of use. But what if we wanted to create multiple robots for battle in an arena? This is where channels come into play.
The radio class has many different configuration options available to the user, but the most basic is channel. To change the channel of the radio we must use:
import radio radio.config(channel=99) radio.on()
So now we can change the channel from 0 to 100. This must be done for every micro:bit that you wish to have on a certain channel.
If you would like your radio signal to go further, then you’ll need to increase the power of the transmission. This is also a configuration option and is handled with:
radio.config(power=7)
Transmission power ranges from -30, -20, -16, -12, -8,-4, 0, 4dBm with each of these seven values relating to a configuration value of 0 to 7 respectively.
If you would like to know more about sending radio signals using the MicroPython then head over to an excellent official resource here: https://microbit-micropython.readthedocs. io/en/latest/radio.html.