File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2+ # SPDX-License-Identifier: MIT
3+
4+ import board
5+ import neopixel
6+
7+ from adafruit_led_animation .animation .rainbow import Rainbow
8+ from adafruit_led_animation .animation .rainbowchase import RainbowChase
9+ from adafruit_led_animation .animation .rainbowcomet import RainbowComet
10+ from adafruit_led_animation .sequence import AnimationSequence
11+
12+ # Update to match the pin connected to your NeoPixels
13+ pixel_pin = board .A0
14+ # Update to match the number of NeoPixels you have connected
15+ pixel_num = 96
16+
17+ pixels = neopixel .NeoPixel (pixel_pin , pixel_num , brightness = 0.8 , auto_write = False )
18+
19+ rainbow = Rainbow (pixels , speed = 0.1 , period = 5 )
20+ rainbow_chase = RainbowChase (pixels , speed = 0.03 , size = 24 , spacing = 4 )
21+ rainbow_comet = RainbowComet (pixels , speed = 0.01 , tail_length = 50 , bounce = True )
22+
23+ animations = AnimationSequence (
24+ rainbow ,
25+ rainbow_comet ,
26+ rainbow_chase ,
27+ advance_interval = 5 ,
28+ auto_clear = True ,
29+ )
30+
31+ while True :
32+ animations .animate ()
You can’t perform that action at this time.
0 commit comments