-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
29 lines (29 loc) · 854 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
input.onButtonPressed(Button.A, function () {
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Entertainer), music.PlaybackMode.LoopingInBackground)
})
input.onButtonPressed(Button.AB, function () {
music.stopAllSounds()
})
input.onButtonPressed(Button.B, function () {
music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Ode), music.PlaybackMode.LoopingInBackground)
})
music.setVolume(255)
let strip = neopixel.create(DigitalPin.P0, 24, NeoPixelMode.RGB)
strip.showRainbow(1, 360)
strip.easeBrightness()
basic.forever(function () {
basic.showLeds(`
. . # . .
. # # # .
# # # # #
# # # # #
. . # . .
`)
basic.pause(2000)
basic.showString("Merry christmas!")
})
basic.forever(function () {
strip.rotate(1)
strip.show()
basic.pause(100)
})