475 B
475 B
Receive Number
Reads the next radio packet if any and returns the first number.
Return value
- the first number number of the packet if any.
0
otherwise.
Examples
Read the number broadcasted by other micro:bits.
radio.onDataReceived(() => {
led.plotBarGraph(radio.receiveNumber(), 1023);
})