Radio block-Examples
1. set Group:
This program makes the group ID equal 128.
2. send Number:
This example broadcasts the level of the light around it. You can do some interesting things with it if you use it along with the on received number example.
3.send Value:
acceleration
This program sends your micro:bit’s acceleration (amount it is speeding up or slowing down) in the x
direction (left and right) to other micro:bits. This kind of program might be useful in a model car or model rocket.
4.send String:
Two-way radio
If you load this program onto two or more micro:bits, you can send a code word from one of them to the others by pressing button A
. The other micro:bits will receive the code word and then show it.
5.on Received Number:
6.on Received Value:
This program keeps sending numbers that say how fast the micro:bit is slowing down or speeding up. When it receives numbers for the same thing from nearby micro:bits, show the numbers as a bar graph.
7.on Received String:
This program continuously sends a cheerful message. It also receives a messages from nearby micro:bits. It shows these messages on the screen.
8.received Packet:
This program uses the signal strength from received packets to graph the approximate distance between two micro:bits.
9.set Transmit Power:
This program makes the radio send at full strength.
10.set Transmit Serial Number:
This program makes the radio
send the serial number in each packet.
11.set Frequency Band:
This program makes the radio use frequency band 50.
12.raise Event:
This is an advanced API.