|
28 | 28 |
|
29 | 29 | # Setup for comet animation
|
30 | 30 | COMET_SPEED = 0.03 # Lower numbers increase the animation speed
|
31 |
| -COMET_INITIAL_COLOR = color.MAGENTA # Color before controller is connected |
32 | 31 | CPB_COMET_TAIL_LENGTH = 5 # The length of the comet on the Circuit Playground Bluefruit
|
33 | 32 | STRIP_COMET_TAIL_LENGTH = 15 # The length of the comet on the NeoPixel strip
|
34 | 33 | CPB_COMET_BOUNCE = False # Set to True to make the comet "bounce" the opposite direction on CPB
|
35 | 34 | STRIP_COMET_BOUNCE = True # Set to False to stop comet from "bouncing" on NeoPixel strip
|
36 | 35 |
|
37 | 36 | # Setup for sparkle animation
|
38 | 37 | SPARKLE_SPEED = 0.03 # Lower numbers increase the animation speed
|
39 |
| -SPARKLE_INITIAL_COLOR = color.PURPLE # Color before controller is connected |
40 | 38 |
|
41 | 39 | # Create the NeoPixel strip
|
42 | 40 | strip_pixels = neopixel.NeoPixel(board.A1, STRIP_PIXEL_NUMBER, auto_write=False)
|
|
54 | 52 | sync=True
|
55 | 53 | ),
|
56 | 54 | AnimationGroup(
|
57 |
| - Comet(cpb.pixels, COMET_SPEED, COMET_INITIAL_COLOR, tail_length=CPB_COMET_TAIL_LENGTH, |
| 55 | + Comet(cpb.pixels, COMET_SPEED, color.MAGENTA, tail_length=CPB_COMET_TAIL_LENGTH, |
58 | 56 | bounce=CPB_COMET_BOUNCE),
|
59 |
| - Comet(strip_pixels, COMET_SPEED, COMET_INITIAL_COLOR, tail_length=STRIP_COMET_TAIL_LENGTH, |
| 57 | + Comet(strip_pixels, COMET_SPEED, color.MAGENTA, tail_length=STRIP_COMET_TAIL_LENGTH, |
60 | 58 | bounce=STRIP_COMET_BOUNCE)
|
61 | 59 | ),
|
62 | 60 | AnimationGroup(
|
63 |
| - Sparkle(cpb.pixels, SPARKLE_SPEED, SPARKLE_INITIAL_COLOR), |
64 |
| - Sparkle(strip_pixels, SPARKLE_SPEED, SPARKLE_INITIAL_COLOR) |
| 61 | + Sparkle(cpb.pixels, SPARKLE_SPEED, color.PURPLE), |
| 62 | + Sparkle(strip_pixels, SPARKLE_SPEED, color.PURPLE) |
65 | 63 | ),
|
66 | 64 | )
|
67 | 65 |
|
|
0 commit comments