# SPDX-FileCopyrightText: 2020 Kattni Rembor for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_led_animation.animation.blink` ================================================================================ Blink animation for CircuitPython helper library for LED animations. * Author(s): Kattni Rembor Implementation Notes -------------------- **Hardware:** * `Adafruit NeoPixels `_ * `Adafruit DotStars `_ **Software and Dependencies:** * Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads """ from adafruit_led_animation.animation.colorcycle import ColorCycle from adafruit_led_animation.color import BLACK class Blink(ColorCycle): """ Blink a color on and off. :param pixel_object: The initialised LED object. :param float speed: Animation speed in seconds, e.g. ``0.1``. :param color: Animation color in ``(r, g, b)`` tuple, or ``0x000000`` hex format. """ def __init__(self, pixel_object, speed, color, name=None): super().__init__(pixel_object, speed, [color, BLACK], name=name) def _set_color(self, color): self.colors = [color, BLACK]