Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let item = 0
- input.onButtonPressed(Button.A, () => {
- radio.sendNumber(5)
- item = 5
- })
- input.onButtonPressed(Button.B, () => {
- radio.sendNumber(10)
- item = 10
- })
- radio.onDataPacketReceived(({receivedNumber}) => {
- if (receivedNumber == item) {
- basic.showLeds(`
- # # # # #
- . . # . .
- . . # . .
- . . # . .
- . . # . .
- `)
- } else {
- basic.showLeds(`
- # . . . #
- . # . # .
- . . # . .
- . # . # .
- # . . . #
- `)
- }
- })
- radio.setGroup(1002)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement