import time
THRESHOLD = 75
BLUE = (0, 0, 255)
TIME = 1
def pulse(px, color, duration):
"""
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):
"""
Runs a simple pulse demo.
Args:
pixels: LED controller object.
"""
# Main loop
while True:
pulse(pixels, BLUE, TIME)
-
Philippe des Boscs authored34cdd0b3