Rewrite for simplicity.

This commit is contained in:
Ron Hale-Evans 2016-06-01 17:11:28 -07:00
parent 985ed56984
commit a3d559c7af
1 changed files with 10 additions and 4 deletions

View File

@ -1,16 +1,22 @@
# Set Group
Sets the group id for ``radio`` communications. A micro:bit can only listen to one group ID at any time.
Make a program have the group ID you tell it for sending and receiving
with ``radio``. A group is like a cable channel (a micro:bit can only
send or receive in one group at a time). A group ID is like the cable
channel number.
Unless specified, the group id is automatically inferred from the script source. Every script with the same exact source code with start with the same group id.
If you do not tell your program which group ID to use with this
function, it will figure out its own group ID by itself. If you load
the very same program onto two different micro:bits, they will be able
to talk to each other because they will have the same group ID.
### Parameters
* ``id`` -- a [number](/reference/types/number) between ``0`` and ``255``.
* ``id`` is a [number](/reference/types/number) from ``0`` to ``255``.
### Example
Sets the group to 128.
This program makes the group ID equal 128.
```blocks
radio.setGroup(128)