Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initConnection() {
- radio.sendNumber(0)
- basic.showLeds(`
- . . # . .
- . . # . .
- # # # # #
- . . # . .
- . . # . .
- `)
- radio.onReceivedNumber(function (receivedNumber: 0) {
- secureState = 1
- })
- basic.showLeds(`
- # . . . #
- . # . # .
- . . # . .
- . # . # .
- # . . . #
- `)
- }
- let secureState = 0
- radio.setGroup(69)
- basic.forever(function () {
- while (secureState = 0) {
- initConnection()
- }
- while (secureState = 1) {
- basic.showLeds(`
- . . . . .
- . . . . #
- . . . # .
- # . # . .
- . # . . .
- `)
- if (input.buttonIsPressed(Button.A)) {secureState = 2}
- }
- while (secureState = 2) {
- basic.showLeds(`
- # . . . #
- . # . # .
- . . # . .
- . # . # .
- # . . . #
- `)
- if (pins.analogReadPin(Pin.P1)){}
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment