Skip to content

Commit 016b97d

Browse files
committed
Add original example back to examples.
2 parents 8bdb9d4 + 43b256c commit 016b97d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
This example uses AnimationsSequence to display multiple animations in sequence, at a five second
3+
interval.
4+
5+
For NeoPixel FeatherWing. Update pixel_pin and pixel_num to match your wiring if using
6+
a different form of NeoPixels.
7+
"""
8+
import board
9+
import neopixel
10+
11+
from adafruit_led_animation.animation.sparkle import Sparkle
12+
from adafruit_led_animation.animation.sparklepulse import SparklePulse
13+
from adafruit_led_animation.sequence import AnimationSequence
14+
from adafruit_led_animation.color import AMBER, JADE
15+
16+
# Update to match the pin connected to your NeoPixels
17+
pixel_pin = board.D6
18+
# Update to match the number of NeoPixels you have connected
19+
pixel_num = 32
20+
21+
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)
22+
23+
sparkle = Sparkle(pixels, speed=0.05, color=AMBER, num_sparkles=10)
24+
sparkle_pulse = SparklePulse(pixels, speed=0.05, period=3, color=JADE)
25+
26+
animations = AnimationSequence(
27+
sparkle, sparkle_pulse, advance_interval=5, auto_clear=True,
28+
)
29+
30+
while True:
31+
animations.animate()

0 commit comments

Comments
 (0)