10
10
11
11
from adafruit_led_animation .animation .sparkle import Sparkle
12
12
from adafruit_led_animation .sequence import AnimationSequence
13
- from adafruit_led_animation .color import AMBER , JADE , AQUA , PINK
13
+ from adafruit_led_animation .color import JADE , AQUA , PINK
14
14
15
- # Update to match the pin connected to your NeoPixels
15
+ # Update to match the pin connected to your NeoPixels
16
16
pixel_pin = board .A1
17
17
# Update to match the number of NeoPixels you have connected
18
18
pixel_num = 64
19
+ # fmt: off
19
20
heart_mask = [ 1 , 2 , 5 , 6 ,
20
21
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ,
21
22
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 ,
32
33
40 , 41 , 46 , 47 ,
33
34
48 , 49 , 50 , 53 , 54 , 55 ,
34
35
56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 ]
36
+ # fmt: on
35
37
36
38
pixels = neopixel .NeoPixel (pixel_pin , pixel_num , brightness = 0.9 , auto_write = False )
37
39
38
40
animations = AnimationSequence (
39
41
Sparkle (pixels , speed = 0.05 , color = JADE , num_sparkles = 1 , mask = unheart_mask ),
40
42
Sparkle (pixels , speed = 0.05 , color = AQUA , num_sparkles = 1 ),
41
43
Sparkle (pixels , speed = 0.05 , color = PINK , num_sparkles = 1 , mask = heart_mask ),
42
- advance_interval = 5 , auto_clear = False ,
44
+ advance_interval = 5 ,
45
+ auto_clear = False ,
43
46
)
44
-
47
+
45
48
while True :
46
- animations .animate ()
49
+ animations .animate ()
0 commit comments