Skip to content

Commit 063b14b

Browse files
authored
Merge pull request #21 from kattni/doc-example-update
Fix doc example to match updated API.
2 parents 4b3475c + f82cf45 commit 063b14b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

adafruit_led_animation/sequence.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,19 @@ class AnimationSequence:
7373
7474
import board
7575
import neopixel
76-
from adafruit_led_animation.animation import AnimationSequence, Blink, Comet, Sparkle
76+
from adafruit_led_animation.sequence import AnimationSequence
77+
import adafruit_led_animation.animation.comet as comet_animation
78+
import adafruit_led_animation.animation.sparkle as sparkle_animation
79+
import adafruit_led_animation.animation.blink as blink_animation
7780
import adafruit_led_animation.color as color
7881
7982
strip_pixels = neopixel.NeoPixel(board.A1, 30, brightness=1, auto_write=False)
8083
81-
blink = Blink(strip_pixels, 0.2, color.RED)
82-
comet = Comet(strip_pixels, 0.1, color.BLUE)
83-
sparkle = Sparkle(strip_pixels, 0.05, color.GREEN)
84+
blink = blink_animation.Blink(strip_pixels, 0.2, color.RED)
85+
comet = comet_animation.Comet(strip_pixels, 0.1, color.BLUE)
86+
sparkle = sparkle_animation.Sparkle(strip_pixels, 0.05, color.GREEN)
8487
85-
animations = AnimationSequence(blink, comet, sparkle, advance_interval=1)
88+
animations = AnimationSequence(blink, comet, sparkle, advance_interval=5)
8689
8790
while True:
8891
animations.animate()

0 commit comments

Comments
 (0)