Adafruit_CircuitPython_LED_.../examples/led_animation_simpletest.py
2020-02-01 12:28:46 -05:00

14 lines
464 B
Python

"""
Example animation sequence.
"""
from adafruit_led_animation.animation import Comet, AnimationSequence, Chase
import neopixel
import board
pixels = neopixel.NeoPixel(board.D6, 32, 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=15)
while True:
animations.animate()