Make simpletest simpler.

This commit is contained in:
Kattni Rembor 2020-05-18 12:47:20 -04:00
parent a90235b31a
commit 5d4e161642

View file

@ -1,18 +1,13 @@
"""
This simpletest example repeatedly displays two animations, Comet and Chase, at a five second
interval.
This simpletest example displays the Blink animation.
For NeoPixel FeatherWing. Update pixel_pin and pixel_num to match your wiring if using
a different form of NeoPixels.
This example does not work on SAMD21 (M0) boards.
"""
import board
import neopixel
from adafruit_led_animation.animation.comet import Comet
from adafruit_led_animation.animation.chase import Chase
from adafruit_led_animation.sequence import AnimationSequence
from adafruit_led_animation.color import PURPLE, WHITE
from adafruit_led_animation.animation.blink import Blink
from adafruit_led_animation.color import RED
# Update to match the pin connected to your NeoPixels
pixel_pin = board.D6
@ -21,10 +16,7 @@ pixel_num = 32
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.2, auto_write=False)
comet = Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
chase = Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
animations = AnimationSequence(comet, chase, advance_interval=5)
blink = Blink(pixels, speed=0.5, color=RED)
while True:
animations.animate()
blink.animate()