Skip to content

Commit 953069f

Browse files
committed
Adding halloween neon code
Adding halloween neon code
1 parent 30d0e99 commit 953069f

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed

Halloween_Neon_Signs/Ghost.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-FileCopyrightText: 2022 Noe Ruiz for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
# Ghost with Glasses Neon Sign
4+
import board
5+
import neopixel
6+
from adafruit_led_animation.animation.blink import Blink
7+
from adafruit_led_animation.animation.comet import Comet
8+
from adafruit_led_animation.animation.chase import Chase
9+
from adafruit_led_animation.animation.pulse import Pulse
10+
from adafruit_led_animation.group import AnimationGroup
11+
from adafruit_led_animation.sequence import AnimationSequence
12+
from adafruit_led_animation import color
13+
14+
ghost_pixels = neopixel.NeoPixel(board.SDA, 90, brightness=0.5, auto_write=False, pixel_order=neopixel.RGB)
15+
glasses_pixels = neopixel.NeoPixel(board.SCL, 33, brightness=0.5, auto_write=False, pixel_order=neopixel.RGB)
16+
17+
animations = AnimationSequence(
18+
# Synchronized animations
19+
AnimationGroup(
20+
Chase(ghost_pixels,speed=0.02, color=color.CYAN, size=40, spacing=5),
21+
Blink(glasses_pixels, speed=.4, color=color.PURPLE),
22+
sync=False,
23+
),
24+
25+
# Sequential animations
26+
Pulse(glasses_pixels, speed=0.01, color=color.WHITE, period=2),
27+
28+
# Synchronized
29+
AnimationGroup(
30+
Pulse(glasses_pixels, speed=0.01, color=color.PURPLE, period=1),
31+
Comet(ghost_pixels, speed=0.01, color=color.CYAN, tail_length=50, bounce=False),
32+
sync=True,
33+
),
34+
35+
advance_interval=4.0,
36+
auto_clear=True,
37+
auto_reset=True,
38+
)
39+
40+
while True:
41+
animations.animate()

Halloween_Neon_Signs/Reaper.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: 2022 Noe Ruiz for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
# Grim Reaper and Moon Neon Sign
4+
import board
5+
import neopixel
6+
from adafruit_led_animation.animation.chase import Chase
7+
from adafruit_led_animation.animation.pulse import Pulse
8+
from adafruit_led_animation.group import AnimationGroup
9+
from adafruit_led_animation.sequence import AnimationSequence
10+
from adafruit_led_animation import color
11+
12+
knife_leds = neopixel.NeoPixel(board.SDA, 48, brightness=0.8, auto_write=False, pixel_order=neopixel.RGB)
13+
repear_leds = neopixel.NeoPixel(board.SCL, 60, brightness=0.8, auto_write=False, pixel_order=neopixel.RGB)
14+
15+
animations = AnimationSequence(
16+
17+
AnimationGroup(
18+
Chase(knife_leds, speed=0.02, color=color.PURPLE, spacing=12, size=40),
19+
Pulse(repear_leds, speed=0.01, color=color.GREEN, period=3),
20+
sync=True,
21+
),
22+
advance_interval=8.0,
23+
auto_clear=True,
24+
auto_reset=True,
25+
)
26+
27+
while True:
28+
animations.animate()

Halloween_Neon_Signs/Wolf.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-FileCopyrightText: 2022 Noe Ruiz for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
# Werewolf and Moon Neon Sign
4+
import board
5+
import neopixel
6+
from adafruit_led_animation.animation.blink import Blink
7+
from adafruit_led_animation.animation.comet import Comet
8+
from adafruit_led_animation.animation.pulse import Pulse
9+
from adafruit_led_animation.group import AnimationGroup
10+
from adafruit_led_animation.sequence import AnimationSequence
11+
from adafruit_led_animation import color
12+
13+
moon_leds = neopixel.NeoPixel(board.SDA, 60, brightness=0.8, auto_write=False, pixel_order=neopixel.RGB)
14+
wolf_leds = neopixel.NeoPixel(board.SCL, 57, brightness=0.8, auto_write=False, pixel_order=neopixel.RGB)
15+
16+
animations = AnimationSequence(
17+
Blink(wolf_leds, speed=0.07, color=color.BLUE),
18+
Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3),
19+
AnimationGroup(
20+
Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3),
21+
Comet(moon_leds, speed=0.01, color=color.AMBER, tail_length=60, reverse=True),
22+
sync=True,
23+
),
24+
AnimationGroup(
25+
Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3),
26+
Pulse(moon_leds, speed=0.01, color=color.AMBER, period=3),
27+
sync=True,
28+
),
29+
AnimationGroup(
30+
Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3),
31+
Pulse(moon_leds, speed=0.01, color=color.AMBER, period=3),
32+
sync=True,
33+
),
34+
advance_interval=2.0,
35+
auto_clear=True,
36+
auto_reset=True,
37+
)
38+
39+
while True:
40+
animations.animate()

0 commit comments

Comments
 (0)