2016-04-05 23:10:53 +02:00
|
|
|
# Radio
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
Send and receive 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("");
|
2019-12-02 05:58:26 +01:00
|
|
|
radio.onReceivedNumber(function (receivedNumber) { });
|
|
|
|
radio.onReceivedValue(function (name, value) { });
|
|
|
|
radio.onReceivedString(function (receivedString) { });
|
|
|
|
radio.receivedPacket(RadioPacketProperty.SignalStrength)
|
2016-04-05 23:10:53 +02:00
|
|
|
radio.setGroup(0);
|
2019-12-02 05:58:26 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Advanced
|
|
|
|
|
|
|
|
```cards
|
2016-07-26 17:47:45 +02:00
|
|
|
radio.setTransmitPower(7);
|
|
|
|
radio.setTransmitSerialNumber(false);
|
2019-12-02 05:58:26 +01: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
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## See Also
|
2016-08-08 22:08:15 +02:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
[send number](/reference/radio/send-number),
|
|
|
|
[send value](/reference/radio/send-value),
|
|
|
|
[send string](/reference/radio/send-string),
|
|
|
|
[on received number](/reference/radio/on-received-number),
|
|
|
|
[on received value](/reference/radio/on-received-value),
|
|
|
|
[on received string](/reference/radio/on-received-string),
|
|
|
|
[received packet](/reference/radio/received-packet),
|
|
|
|
[set group](/reference/radio/set-group),
|
|
|
|
[set transmit power](/reference/radio/set-transmit-power),
|
|
|
|
[set transmit serial number](/reference/radio/set-transmit-serial-number),
|
|
|
|
[raise event](/reference/radio/raise-event)
|