|
7 | 7 | """
|
8 | 8 | import board
|
9 | 9 | 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 |
12 | 12 | from adafruit_led_animation.color import PURPLE, JADE, AMBER
|
13 | 13 |
|
14 | 14 |
|
15 | 15 | pixels = neopixel.NeoPixel(board.D6, 32, brightness=0.2, auto_write=False)
|
16 | 16 |
|
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) |
19 | 19 | )
|
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) |
22 | 22 | )
|
23 | 23 |
|
24 |
| -comet_h = Comet( |
| 24 | +comet_h = animation.Comet( |
25 | 25 | pixel_wing_horizontal, speed=0.1, color=PURPLE, tail_length=3, bounce=True
|
26 | 26 | )
|
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( |
30 | 34 | pixel_wing_vertical, speed=0.1, size=3, spacing=2, wheel_step=8
|
31 | 35 | )
|
32 |
| -rainbow_comet_v = RainbowComet( |
| 36 | +rainbow_comet_v = animation.RainbowComet( |
33 | 37 | pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True
|
34 | 38 | )
|
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 | +) |
37 | 43 |
|
38 |
| -animations = AnimationSequence( |
| 44 | +animations = helper.AnimationSequence( |
39 | 45 | rainbow_v,
|
40 | 46 | comet_h,
|
41 | 47 | rainbow_comet_v,
|
|
0 commit comments