set Group

Make a program have the group ID you tell it for sending and receiving with radio.

radio.setGroup(0);

A group is like a cable channel (a Calliope mini can only send or receive in one group at a time). A group ID is like the cable channel number.

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 Calliope minis, they will be able to talk to each other because they will have the same group ID.

Parameters

Default radio group

If you haven’t set a radio group for the Calliope mini, it will use one selected randomly. If you are transmiting data to a Calliope mini that has a different hardware version from the sending Calliope mini, it will select a random default group that is not the same as the other Calliope mini. To be certain that your program will send or receive data using the same radio group, you will need to first choose and set a radio group for your program if you want it to work between different versions of the Calliope mini.

Simulator

This function only works on the Calliope mini, not in browsers.

Example

This program makes the group ID equal 128.

radio.setGroup(128)

See also

on received number, on received string, on received value, send number, send value, send string

radio