pulse.py 705 Bytes
import time

from .abstract import LEDController

THRESHOLD: int = 75
BLUE: tuple[int, int, int] = (0, 0, 255)
TIME: int = 1


def pulse(px: LEDController, color: tuple[int, int, int], duration: float):
    """
    Fills pixels with a color for a duration, then turns them off.

    Args:
        px (): LED controller object.
        color (tuple): Color to display.
        duration (float): time in seconds to keep the color on/off.
    """
    pass  # Delete this line when you start coding!


def run_simple_pulse(pixels: LEDController):
    """
    Runs a simple pulse demo.

    Args:
        pixels: LED controller object.
    """
    # Main loop
    while True:
        pulse(pixels, BLUE, TIME)