Skip to content

Instantly share code, notes, and snippets.

@uktechreviews
Last active August 21, 2017 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uktechreviews/16a4bd8176896c9c01ddb58dc1aab967 to your computer and use it in GitHub Desktop.
Save uktechreviews/16a4bd8176896c9c01ddb58dc1aab967 to your computer and use it in GitHub Desktop.
from gpiozero import LED
from time import sleep
green = LED(14)
amber = LED(15)
red = LED(18)
list = [red,amber,green]
while True:
choice = random.choice(list)
choice.on()
sleep(1)
choice.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment