Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created July 8, 2016 13:23
Show Gist options
  • Select an option

  • Save bennuttall/b9ca2148d97b148caa17c4bd31b0a68a to your computer and use it in GitHub Desktop.

Select an option

Save bennuttall/b9ca2148d97b148caa17c4bd31b0a68a to your computer and use it in GitHub Desktop.
gpiozero led button
from gpiozero import Button, LED
from signal import pause
led = LED(25)
button = Button(14)
button.when_pressed = led.toggle
pause()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment