466 B
466 B
On Data Received
Registers code to run when a packet is received over radio
.
Parameters
- body - is an action
Example
basic.forever(() => {
radio.sendNumber(input.acceleration(Dimension.X));
})
radio.onDataReceived(() => {
led.plotBarGraph(radio.receiveNumber(), 1023);
})