Projekt:Calliope/Scripte/1

Aus Un-Hack-Bar
Wechseln zu: Navigation, Suche
input.onButtonPressed(Button.A, () => {
   radio.sendNumber(1)
})
input.onButtonPressed(Button.B, () => {
   radio.sendNumber(2)
})
radio.onDataPacketReceived( ({ receivedNumber }) =>  {
   if (receivedNumber == 1) {
       basic.showString("1")
   }
   if (receivedNumber == 2) {
       basic.showString("2")
   }
})
radio.setGroup(18)