from gpiozero import LED
from time import sleep
from random import choice
leds = [ LED(17), LED(18),
LED(24), LED(25), LED(5), LED(6), LED(16),
LED(23), LED(22), LED(12), LED(20), LED(19),
LED(4), LED(27), LED(21), LED(13), LED(26) ]
try:
while True:
led = choice(leds)
led.toggle()
sleep(0.01)
except KeyboardInterrupt:
for led in leds:
led.close()
Last active
November 28, 2021 14:55
-
-
Save tiagordc/8d1d02a2c3eed6e3ee038028e23ac97f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment