pxt-calliope/docs/reference/radio.md

29 lines
1.0 KiB
Markdown
Raw Normal View History

2016-04-05 23:10:53 +02:00
# Radio
2016-05-05 21:32:40 +02:00
Communicate data using radio packets
2016-04-05 23:10:53 +02:00
```cards
radio.sendNumber(0);
2016-05-17 07:18:58 +02:00
radio.sendValue("data", 0);
radio.sendString("");
2016-04-05 23:10:53 +02:00
radio.onDataReceived(() => {
});
radio.receiveNumber();
radio.receivedNumberAt(0);
2016-05-17 07:18:58 +02:00
radio.receiveString();
2016-04-05 23:10:53 +02:00
radio.receivedSignalStrength();
radio.setGroup(0);
2016-07-26 17:47:45 +02:00
radio.setTransmitPower(7);
radio.setTransmitSerialNumber(false);
2016-08-08 22:08:15 +02:00
radio.writeValueToSerial();
```
```package
microbit-radio
2016-04-05 23:10:53 +02:00
```
2016-08-08 22:08:15 +02:00
### See Also
[sendNumber](/reference/radio/send-number), [sendValue](/reference/radio/send-value), [sendString](/reference/radio/send-string), [onDataReceived](/reference/radio/on-data-received), [receiveNumber](/reference/radio/receive-number), [receivedNumberAt](/reference/radio/received-number-at), [receiveString](/reference/radio/receive-string), [receivedSignalStrength](/reference/radio/received-signal-strength), [setGroup](/reference/radio/set-group), [setTransmitPower](/reference/radio/set-transmit-power), [setTransmitSerialNumber](/reference/radio/set-transmit-serial-number), [writeValueToSerial](/reference/radio/write-value-to-serial)