2.1.28, initiation update to PXT v5.28.24 (#54)

This commit is contained in:
Amerlander
2019-12-02 05:58:26 +01:00
committed by Peli de Halleux
parent 38a964516e
commit 5c114a0c57
1261 changed files with 50692 additions and 21604 deletions

View File

@ -1,7 +1,13 @@
# Set Group
# set Group
Make a program have the group ID you tell it for sending and receiving
with ``radio``. A group is like a cable channel (a @boardname@ can only
with radio.
```sig
radio.setGroup(0);
```
A group is like a cable channel (a @boardname@ can only
send or receive in one group at a time). A group ID is like the cable
channel number.
@ -10,19 +16,15 @@ function, it will figure out its own group ID by itself. If you load
the very same program onto two different @boardname@s, they will be able
to talk to each other because they will have the same group ID.
```sig
radio.setGroup(0);
```
## Parameters
### Parameters
* **id**: a [number](/types/number) from ``0`` to ``255``.
* ``id`` is a [number](/reference/types/number) from ``0`` to ``255``.
### Simulator
## Simulator
This function only works on the @boardname@, not in browsers.
### Example
## Example
This program makes the group ID equal 128.
@ -30,9 +32,11 @@ This program makes the group ID equal 128.
radio.setGroup(128)
```
### See also
## See also
[on data packet received](/reference/radio/on-data-packet-received),
[on received number](/reference/radio/on-received-number),
[on received string](/reference/radio/on-received-string),
[on received value](/reference/radio/on-received-value),
[send number](/reference/radio/send-number),
[send value](/reference/radio/send-value),
[send string](/reference/radio/send-string)