When I use Control-C to stop the program, all LEDs don't turn off; they stop blinking, but some remain lighted.
Code: Select all
from gpiozero import LEDBoard from gpiozero.tools import random_values from signal import pause tree = LEDBoard(*range(2,28),pwm=True) for led in tree: led.source_delay = 0.1 led.source = random_values() pause()
What command should be used with GPIO Zero to turn off all the LEDs when I want to exit the program? Thanks for help!