|
9 | 9 | import board
|
10 | 10 | import neopixel
|
11 | 11 |
|
12 |
| -import adafruit_led_animation.animation.blink as blink_animation |
13 |
| -import adafruit_led_animation.animation.sparklepulse as sparklepulse_animation |
14 |
| -import adafruit_led_animation.animation.comet as comet_animation |
15 |
| -import adafruit_led_animation.animation.chase as chase_animation |
16 |
| -import adafruit_led_animation.animation.pulse as pulse_animation |
17 |
| -import adafruit_led_animation.animation.sparkle as sparkle_animation |
18 |
| -import adafruit_led_animation.animation.rainbowchase as rainbowchase_animation |
19 |
| -import adafruit_led_animation.animation.rainbowsparkle as rainbowsparkle_animation |
20 |
| -import adafruit_led_animation.animation.rainbowcomet as rainbowcomet_animation |
21 |
| -import adafruit_led_animation.animation.solid as solid_animation |
22 |
| -import adafruit_led_animation.animation.colorcycle as colorcycle_animation |
23 |
| -import adafruit_led_animation.animation.rainbow as rainbow_animation |
| 12 | +from adafruit_led_animation.animation.blink import Blink |
| 13 | +from adafruit_led_animation.animation.sparklepulse import SparklePulse |
| 14 | +from adafruit_led_animation.animation.comet import Comet |
| 15 | +from adafruit_led_animation.animation.chase import Chase |
| 16 | +from adafruit_led_animation.animation.pulse import Pulse |
| 17 | +from adafruit_led_animation.animation.sparkle import Sparkle |
| 18 | +from adafruit_led_animation.animation.rainbowchase import RainbowChase |
| 19 | +from adafruit_led_animation.animation.rainbowsparkle import RainbowSparkle |
| 20 | +from adafruit_led_animation.animation.rainbowcomet import RainbowComet |
| 21 | +from adafruit_led_animation.animation.solid import Solid |
| 22 | +from adafruit_led_animation.animation.colorcycle import ColorCycle |
| 23 | +from adafruit_led_animation.animation.rainbow import Rainbow |
24 | 24 | from adafruit_led_animation.sequence import AnimationSequence
|
25 | 25 | from adafruit_led_animation.color import PURPLE, WHITE, AMBER, JADE, MAGENTA, ORANGE
|
26 | 26 |
|
|
31 | 31 |
|
32 | 32 | pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.2, auto_write=False)
|
33 | 33 |
|
34 |
| -blink = blink_animation.Blink(pixels, speed=0.5, color=JADE) |
35 |
| -colorcycle = colorcycle_animation.ColorCycle( |
36 |
| - pixels, speed=0.4, colors=[MAGENTA, ORANGE] |
37 |
| -) |
38 |
| -comet = comet_animation.Comet( |
39 |
| - pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True |
40 |
| -) |
41 |
| -chase = chase_animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE) |
42 |
| -pulse = pulse_animation.Pulse(pixels, speed=0.1, period=3, color=AMBER) |
43 |
| -sparkle = sparkle_animation.Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10) |
44 |
| -solid = solid_animation.Solid(pixels, color=JADE) |
45 |
| -rainbow = rainbow_animation.Rainbow(pixels, speed=0.1, period=2) |
46 |
| -sparkle_pulse = sparklepulse_animation.SparklePulse( |
47 |
| - pixels, speed=0.1, period=3, color=JADE |
48 |
| -) |
49 |
| -rainbow_comet = rainbowcomet_animation.RainbowComet( |
50 |
| - pixels, speed=0.1, tail_length=7, bounce=True |
51 |
| -) |
52 |
| -rainbow_chase = rainbowchase_animation.RainbowChase( |
53 |
| - pixels, speed=0.1, size=3, spacing=2, wheel_step=8 |
54 |
| -) |
55 |
| -rainbow_sparkle = rainbowsparkle_animation.RainbowSparkle( |
56 |
| - pixels, speed=0.1, num_sparkles=15 |
57 |
| -) |
| 34 | +blink = Blink(pixels, speed=0.5, color=JADE) |
| 35 | +colorcycle = ColorCycle(pixels, speed=0.4, colors=[MAGENTA, ORANGE]) |
| 36 | +comet = Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True) |
| 37 | +chase = Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE) |
| 38 | +pulse = Pulse(pixels, speed=0.1, period=3, color=AMBER) |
| 39 | +sparkle = Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10) |
| 40 | +solid = Solid(pixels, color=JADE) |
| 41 | +rainbow = Rainbow(pixels, speed=0.1, period=2) |
| 42 | +sparkle_pulse = SparklePulse(pixels, speed=0.1, period=3, color=JADE) |
| 43 | +rainbow_comet = RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True) |
| 44 | +rainbow_chase = RainbowChase(pixels, speed=0.1, size=3, spacing=2, wheel_step=8) |
| 45 | +rainbow_sparkle = RainbowSparkle(pixels, speed=0.1, num_sparkles=15) |
58 | 46 |
|
59 | 47 |
|
60 | 48 | animations = AnimationSequence(
|
|
0 commit comments