Skip to content

Commit 5d4e161

Browse files
committed
Make simpletest simpler.
1 parent a90235b commit 5d4e161

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

examples/led_animation_simpletest.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
"""
2-
This simpletest example repeatedly displays two animations, Comet and Chase, at a five second
3-
interval.
2+
This simpletest example displays the Blink animation.
43
54
For NeoPixel FeatherWing. Update pixel_pin and pixel_num to match your wiring if using
65
a different form of NeoPixels.
7-
8-
This example does not work on SAMD21 (M0) boards.
96
"""
107
import board
118
import neopixel
12-
from adafruit_led_animation.animation.comet import Comet
13-
from adafruit_led_animation.animation.chase import Chase
14-
from adafruit_led_animation.sequence import AnimationSequence
15-
from adafruit_led_animation.color import PURPLE, WHITE
9+
from adafruit_led_animation.animation.blink import Blink
10+
from adafruit_led_animation.color import RED
1611

1712
# Update to match the pin connected to your NeoPixels
1813
pixel_pin = board.D6
@@ -21,10 +16,7 @@
2116

2217
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.2, auto_write=False)
2318

24-
comet = Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
25-
chase = Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
26-
27-
animations = AnimationSequence(comet, chase, advance_interval=5)
19+
blink = Blink(pixels, speed=0.5, color=RED)
2820

2921
while True:
30-
animations.animate()
22+
blink.animate()

0 commit comments

Comments
 (0)