ef9e2b36e523dfdf9a90770601bbbbe15e289ecd
7 np
= neopixel
.NeoPixel(pin0
, NP_COUNT
)
14 #########################################
17 initial_colour
= (255, 128, 128)
19 for i
in range(BURST_SIZE
):
20 pixels
[NP_COUNT
- BURST_SIZE
+ i
] = initial_colour
21 pixels
[NP_COUNT
- BURST_SIZE
- i
] = initial_colour
24 # End of function to add
25 #########################################
28 for n
in range(NP_COUNT
):
33 def shoot_firework(pixels
):
34 for pixel
in range(NP_COUNT
- BURST_SIZE
):
43 last_gesture
= accelerometer
.current_gesture()
46 gesture
= accelerometer
.current_gesture()
47 if gesture
!= last_gesture
or button_a
.is_pressed():
50 explode(np
) # Add this line
52 last_gesture
= gesture