Skip to content

Commit 98da8ab

Browse files
committed
Import fix.
1 parent ed4bbf9 commit 98da8ab

File tree

2 files changed

+33
-25
lines changed

2 files changed

+33
-25
lines changed

examples/led_animation_all_animations.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77
import board
88
import neopixel
9-
from adafruit_led_animation.animation import *
9+
from adafruit_led_animation import animation
1010
from adafruit_led_animation.helper import AnimationSequence
1111
from adafruit_led_animation.color import PURPLE, WHITE, AMBER, JADE
1212

@@ -17,16 +17,18 @@
1717

1818
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.2, auto_write=False)
1919

20-
blink = Blink(pixels, speed=0.1, color=JADE)
21-
comet = Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
22-
chase = Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
23-
pulse = Pulse(pixels, speed=0.1, period=3, color=AMBER)
24-
sparkle = Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10)
25-
solid = Solid(pixels, color=JADE)
26-
rainbow = Rainbow(pixels, speed=0.1, period=2)
27-
sparkle_pulse = SparklePulse(pixels, speed=0.1, period=3, color=JADE)
28-
rainbow_comet = RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True)
29-
rainbow_chase = RainbowChase(pixels, speed=0.1, size=3, spacing=2, wheel_step=8)
20+
blink = animation.Blink(pixels, speed=0.1, color=JADE)
21+
comet = animation.Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
22+
chase = animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
23+
pulse = animation.Pulse(pixels, speed=0.1, period=3, color=AMBER)
24+
sparkle = animation.Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10)
25+
solid = animation.Solid(pixels, color=JADE)
26+
rainbow = animation.Rainbow(pixels, speed=0.1, period=2)
27+
sparkle_pulse = animation.SparklePulse(pixels, speed=0.1, period=3, color=JADE)
28+
rainbow_comet = animation.RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True)
29+
rainbow_chase = animation.RainbowChase(
30+
pixels, speed=0.1, size=3, spacing=2, wheel_step=8
31+
)
3032

3133

3234
animations = AnimationSequence(

examples/led_animation_gridmap.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,41 @@
77
"""
88
import board
99
import neopixel
10-
from adafruit_led_animation.animation import *
11-
from adafruit_led_animation.helper import *
10+
from adafruit_led_animation import animation
11+
from adafruit_led_animation import helper
1212
from adafruit_led_animation.color import PURPLE, JADE, AMBER
1313

1414

1515
pixels = neopixel.NeoPixel(board.D6, 32, brightness=0.2, auto_write=False)
1616

17-
pixel_wing_vertical = PixelMap.vertical_lines(
18-
pixels, 8, 4, horizontal_strip_gridmap(8, alternating=False)
17+
pixel_wing_vertical = helper.PixelMap.vertical_lines(
18+
pixels, 8, 4, helper.horizontal_strip_gridmap(8, alternating=False)
1919
)
20-
pixel_wing_horizontal = PixelMap.horizontal_lines(
21-
pixels, 8, 4, horizontal_strip_gridmap(8, alternating=False)
20+
pixel_wing_horizontal = helper.PixelMap.horizontal_lines(
21+
pixels, 8, 4, helper.horizontal_strip_gridmap(8, alternating=False)
2222
)
2323

24-
comet_h = Comet(
24+
comet_h = animation.Comet(
2525
pixel_wing_horizontal, speed=0.1, color=PURPLE, tail_length=3, bounce=True
2626
)
27-
comet_v = Comet(pixel_wing_vertical, speed=0.1, color=AMBER, tail_length=6, bounce=True)
28-
chase_h = Chase(pixel_wing_horizontal, speed=0.1, size=3, spacing=6, color=JADE)
29-
rainbow_chase_v = RainbowChase(
27+
comet_v = animation.Comet(
28+
pixel_wing_vertical, speed=0.1, color=AMBER, tail_length=6, bounce=True
29+
)
30+
chase_h = animation.Chase(
31+
pixel_wing_horizontal, speed=0.1, size=3, spacing=6, color=JADE
32+
)
33+
rainbow_chase_v = animation.RainbowChase(
3034
pixel_wing_vertical, speed=0.1, size=3, spacing=2, wheel_step=8
3135
)
32-
rainbow_comet_v = RainbowComet(
36+
rainbow_comet_v = animation.RainbowComet(
3337
pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True
3438
)
35-
rainbow_v = Rainbow(pixel_wing_vertical, speed=0.1, period=2)
36-
rainbow_chase_h = RainbowChase(pixel_wing_horizontal, speed=0.1, size=3, spacing=3)
39+
rainbow_v = animation.Rainbow(pixel_wing_vertical, speed=0.1, period=2)
40+
rainbow_chase_h = animation.RainbowChase(
41+
pixel_wing_horizontal, speed=0.1, size=3, spacing=3
42+
)
3743

38-
animations = AnimationSequence(
44+
animations = helper.AnimationSequence(
3945
rainbow_v,
4046
comet_h,
4147
rainbow_comet_v,

0 commit comments

Comments
 (0)