Python Radio 24: The BBC Micro:bit

Simon Quellen Field
Radio Hackers
Published in
4 min readSep 11, 2024

--

A fun little computer.

Photo by the author

The Micro:bit computer from the BBC (yes, the British Broadcasting Company) shown above in its robotic rover carrier, is based on the Nordic nRF52833 processor (an ARM Cortex-M4 32-bit processor with a floating point unit). It has half a megabyte of flash memory for programs and 128k bytes of RAM.

Besides the processor, it has on the board a Nordic S113 SoftDevice Bluetooth Low Energy chip. This is made available to MicroPython as the radio module, which greatly simplifies the use of Bluetooth Low Energy, taking care of all the complicated bits.

For example, here is a program where two Micro:bits send messages to one another:

from microbit import *
import radio

radio.config(group=23, power=7, data_rate=radio.RATE_1MBIT)
radio.on()
count = 0
msg_num = 0
while True:
if count == 50000:
radio.send(’hello ‘ + str(msg_num))
msg_num += 1
count = 0
count += 1
message = radio.receive()
if message:
print(message)
display.scroll(message)

The config() method sets up a group of radios that can communicate with one another (like a channel). It sets the transmit power to the maximum of 4dBm (2.5 milliwatts), and the speed to a megabit per second (maximum is 2 megabits per second, at the expense of range).

--

--

Radio Hackers
Radio Hackers

Published in Radio Hackers

Exploring software-defined radio and the radio spectrum. We provide tutorials & theory articles on a wide range of Communication modes, RF protocols & real-world use cases for IOT & CyberSec. Are you a writer? Submit a tutorial or share your experiences with the community.

Simon Quellen Field
Simon Quellen Field

Written by Simon Quellen Field

Simon Quellen Field is a science writer and novelist currently experimenting with shorter works. Find his books at scitoys.com/books or his website scitoys.com.

Responses (3)