A micro:bit on the cable relays messages by radio, so the micro:bit doing the work can be anywhere in the room. The bridge passes radio to serial one way and serial to radio the other.
Smart-home sensors, farm soil probes and wildlife cameras send their readings by radio to one hub, and the hub passes them on to a computer. The hub is a bridge.
A micro:bit on a cable can't go far. In this lesson a second micro:bit, anywhere in the room, sends its readings by radio to the micro:bit on the cable, which passes them on to the computer. That micro:bit is a bridge.
The same program goes on both micro:bits: each part only does something on the micro:bit where it makes sense. In the simulator you will see two micro:bits running it.
Readings travel with radio send value (in Radio): a short name, such as temp, and a number together. on radio received value gives the bridge both, as name and value. A name can be 8 characters at most: a longer one, such as temperature, is cut short on the way.
Make your prediction first. Help opens once you've locked it in.

// Bridge: radio to the computer
radio.onReceivedValue(function (name, value) {
serial.writeValue(name, value)
})
// Sensor: send the temperature by radio every second
basic.forever(function () {
radio.sendValue("temp", input.temperature())
basic.pause(1000)
})
radio.setGroup(7)
The simulator runs the program on two micro:bits. Change the temperature on one of them, then open Show data to see what the other passes on.

// Bridge: radio to the computer
radio.onReceivedValue(function (name, value) {
serial.writeValue(name, value)
})
// Sensor: send the temperature by radio every second
basic.forever(function () {
radio.sendValue("temp", input.temperature())
basic.pause(1000)
})
radio.setGroup(7)
Download the program to two micro:bits. Plug one in and connect it here; put the other on a battery pack across the room (or hold it in your hands to warm it up).
Collect at least 5 temperature readings through the bridge.
Use the board. This ticks when you get there.

// Bridge: radio to the computer
radio.onReceivedValue(function (name, value) {
serial.writeValue(name, value)
})
// Sensor: send the temperature by radio every second
basic.forever(function () {
radio.sendValue("temp", input.temperature())
basic.pause(1000)
})
radio.setGroup(7)

radio.onReceivedValue(function (name, value) {
serial.writeValue(name, value)
})
radio.setGroup(8)
Match each block with the job it does in the bridge.
Send the light level as well. Did you have to change the bridge?
In forever, add radio send value light, light level.
Add the other direction: the bridge passes each line from the computer on by radio, and the far micro:bit beeps when it receives beep.
On serial data received: radio send string, read line. That is the computer-to-radio direction.
On radio received string: if receivedString = beep, play a tone (Music).
The far micro:bit sends its light level too.
This ticks by itself when your blocks do what is asked.
The computer can send beep through the bridge, and the far micro:bit beeps.
This ticks by itself when your blocks do what is asked.
Make a room monitor: the far micro:bit reports temperature and light every second, shows an alarm (a cross) when the computer sends alarm, clears it on clear, and reports alarm 1 or alarm 0 so the computer knows it worked.
The bridge part: serial to radio, and radio to serial (from the last step).
The far part: send temp and light every second; on radio received string alarm show a cross and send alarm 1; clear clears the screen and sends alarm 0.
A room monitor: a bridge both ways; the far micro:bit sends temperature and light every second, shows an alarm on alarm and clears on clear, and reports alarm 1 or 0.
This ticks by itself when your blocks do what is asked.
Download your monitor to two micro:bits, connect the bridge here, and try Alarm and Clear.
Use the board to set and clear the alarm, and see alarm 1 and 0 come back.
Use the board. This ticks when you get there.
Students build a radio bridge, so a micro:bit across the room sends readings to the computer and receives commands from it. About 50 minutes.
Open the teacher guide: answers, solutions, slides and a worksheet.
The idea: a bridge relays. On the micro:bit plugged into the computer, on radio received value → serial write value passes radio readings to the computer, and on serial data received → radio send string passes lines from the computer on by radio. The micro:bit across the room only uses radio.
One program on both micro:bits: each part only does something on the micro:bit where it matters (the bridge also sends its own temperature by radio, but no other micro:bit passes it on, and a micro:bit never hears its own messages). This keeps the lesson to one program; in the simulator, a radio program runs on two micro:bits.
Hardware: two micro:bits per pair (one with a battery pack), a data cable and Chrome or Edge. The board steps are typical, so classes without hardware use the simulator's Show data. Give every pair its own radio group before anyone downloads, or bridges pick up other pairs' readings.
Three parts in a chain: far micro:bit, bridge, computer. When nothing arrives, ask them to check each link in turn, starting with the radio group.
Stretch: Use three micro:bits: two sensors in different rooms, each sending its own name (temp1, temp2), and graph both.
Support: Give the bridge part complete; students write only the far micro:bit's part.
Next: train a model and let its labels travel the same path. Real world: smart-home hubs, farm sensor networks, wildlife monitoring.