Coding
Setting the Radio Group
-
Select and drag the
foreverblock to the left and drop it on the bin. -
From Radio select and drag a
radio set group 1block to the code area and attach it within theon startblock. Change 1 to 30.
If you are working with more than one group of pairs, make sure each pair is on a different radio group.
Outgoing Message
-
From Input select and drag an
on shakeblock to the code area and drop it. -
From Basic select and drag a
clear screenblock to the code area and attach it within theon shakeblock. -
From Radio select and drag a
radio send string “ “block to the code area and attach it under theclear screenblock. Within the blank space type GHOST.
Incoming Message
-
From Radio select and drag an
on radio received received stringblock to the code area and drop it. -
From Basic select and drag a
show iconblock to the code area and attach it within theon radio received received stringblock. Select the heart and pick the ghost icon.
Completed Code:

Now that we have completed our code, lets move on and download it to our micro:bits.