Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let CountingDown = false
- let counter = 0
- input.onButtonPressed(Button.A, () => {
- counter += 1
- })
- input.onButtonPressed(Button.B, () => {
- CountingDown = true
- })
- counter = 3
- CountingDown = false
- basic.forever(() => {
- basic.showNumber(counter)
- if (CountingDown == true) {
- basic.pause(1000)
- counter += -1
- if (counter <= 0) {
- CountingDown = false
- basic.pause(100)
- basic.showLeds(`
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- `)
- basic.pause(100)
- basic.showLeds(`
- . # # . .
- # . . # .
- # . . # .
- # . . # .
- . # # . .
- `)
- basic.pause(100)
- basic.showLeds(`
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- `)
- basic.pause(100)
- basic.showLeds(`
- . # # . .
- # . . # .
- # . . # .
- # . . # .
- . # # . .
- `)
- basic.pause(100)
- basic.showLeds(`
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- . . . . .
- `)
- basic.pause(100)
- basic.showLeds(`
- . # # . .
- # . . # .
- # . . # .
- # . . # .
- . # # . .
- `)
- }
- }
- })
Add Comment
Please, Sign In to add comment