Skip to content

Commit

Permalink
default group id is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
CleoQc committed Jul 8, 2019
1 parent f3b7bae commit f8dd3d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions giggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,21 @@ namespace lights {
//% groups='["other", "Both Remote and GiggleBot:", "Remote Controller:", "GiggleBot:"]'
namespace remote {

let radio_id = -1
/**
* In order to have a remote micro:bit control the GiggleBot, both of them
* must be in the same radio group - or remote group. You can use either this
* block or the "radio set group" block found under Radio.
* The two blocks are the same thing.
* Make sure your set of remote microbit and gigglebot is assigned a unique
* group, especially if you are in a group.
* @param id
* group, especially if there are many gigglebot pairs around you.
* @param id eg: 1
*/
//% blockId="gigglebot_remote_set_group"
//% block="set remote group %id"
//% block="remote set group %id"
//% weight=99
//% group="Both Remote and GiggleBot:"
export function setGroup(id: number): void {
radio.setGroup(id)
radio_id = id
}

/**
Expand Down

0 comments on commit f8dd3d6

Please sign in to comment.