Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created November 11, 2015 14:50
Show Gist options
  • Save bennuttall/24dba26d96669fa917c2 to your computer and use it in GitHub Desktop.
Save bennuttall/24dba26d96669fa917c2 to your computer and use it in GitHub Desktop.
Glove
from gpiozero import LED, Button
from time import sleep
from signal import pause
red = LED(21)
green = LED(24)
switch = Button(14, pull_up=False)
while True:
switch.wait_for_active()
green.blink(on_time=0.1, off_time=0.1)
sleep(0.1)
red.blink(on_time=0.1, off_time=0.1)
sleep(5)
green.off()
red.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment