← Reference

A radio bridge: cheat sheet

micro:bit and the computer · Find each block in the MakeCode toolbox (the category is at the end of each line).

radio set group

Picks a channel (0 to 255). Only micro:bits in the same group hear each other. Radio.

radio.setGroup(1)
The block

on radio received string

Runs each time a word arrives; receivedString holds it. Radio.

radio.onReceivedString(function (receivedString) {
    blocks
})
The block

radio send string

Sends a word to every other micro:bit in the group. Radio.

radio.sendString("hi")
The block

radio send value

Sends a name and a number by radio, such as bin and 1. Radio.

radio.sendValue("bin", 1)
The block

on radio received value

Runs each time a name and number arrive by radio. Radio.

radio.onReceivedValue(function (name, value) {
    blocks
})
The block