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-10-27 23:48:22 +02:00
|
|
|
radio.sendValue("name", 0);
|
2016-05-17 07:18:58 +02:00
|
|
|
radio.sendString("");
|
2018-09-06 23:37:40 +02:00
|
|
|
radio.onReceivedNumber(function (receivedNumber) { });
|
|
|
|
radio.onReceivedValue(function (name, value) { });
|
|
|
|
radio.onReceivedString(function (receivedString) { });
|
2016-04-05 23:10:53 +02:00
|
|
|
radio.setGroup(0);
|
2016-07-26 17:47:45 +02:00
|
|
|
radio.setTransmitPower(7);
|
|
|
|
radio.setTransmitSerialNumber(false);
|
2016-10-26 01:38:01 +02:00
|
|
|
radio.writeReceivedPacketToSerial();
|
2018-01-30 19:11:12 +01:00
|
|
|
radio.sendBuffer(null);
|
2018-10-08 18:46:23 +02:00
|
|
|
radio.raiseEvent(0, 0);
|
2016-08-08 22:08:15 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```package
|
2016-10-23 06:29:31 +02:00
|
|
|
radio
|
2016-04-05 23:10:53 +02:00
|
|
|
```
|
2016-08-08 22:08:15 +02:00
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## See Also
|
2016-08-08 22:08:15 +02:00
|
|
|
|
2016-10-25 01:30:21 +02:00
|
|
|
[sendNumber](/reference/radio/send-number),
|
|
|
|
[sendValue](/reference/radio/send-value),
|
|
|
|
[sendString](/reference/radio/send-string),
|
2018-01-30 19:11:12 +01:00
|
|
|
[sendBuffer](/reference/radio/send-buffer),
|
2018-09-06 23:37:40 +02:00
|
|
|
[onReceivedNumber](/reference/radio/on-received-number),
|
|
|
|
[onReceivedValue](/reference/radio/on-received-value),
|
|
|
|
[onReceivedString](/reference/radio/on-received-string),
|
2016-10-25 01:30:21 +02:00
|
|
|
[setGroup](/reference/radio/set-group),
|
|
|
|
[setTransmitPower](/reference/radio/set-transmit-power),
|
|
|
|
[setTransmitSerialNumber](/reference/radio/set-transmit-serial-number),
|
2018-10-08 18:46:23 +02:00
|
|
|
[writeReceivedPacketToSerial](/reference/radio/write-received-packet-to-serial),
|
|
|
|
[raiseEvent](/reference/radio/raise-event)
|