/ Halloween_Neon_Signs / Wolf.py
Wolf.py
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, 14 auto_write=False, pixel_order=neopixel.RGB) 15 wolf_leds = neopixel.NeoPixel(board.SCL, 57, brightness=0.8, 16 auto_write=False, pixel_order=neopixel.RGB) 17 18 animations = AnimationSequence( 19 Blink(wolf_leds, speed=0.07, color=color.BLUE), 20 Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3), 21 AnimationGroup( 22 Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3), 23 Comet(moon_leds, speed=0.01, color=color.AMBER, tail_length=60, reverse=True), 24 sync=True, 25 ), 26 AnimationGroup( 27 Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3), 28 Pulse(moon_leds, speed=0.01, color=color.AMBER, period=3), 29 sync=True, 30 ), 31 AnimationGroup( 32 Pulse(wolf_leds, speed=0.01, color=color.PURPLE, period=3), 33 Pulse(moon_leds, speed=0.01, color=color.AMBER, period=3), 34 sync=True, 35 ), 36 advance_interval=2.0, 37 auto_clear=True, 38 auto_reset=True, 39 ) 40 41 while True: 42 animations.animate()