Created
July 8, 2016 13:23
-
-
Save bennuttall/b9ca2148d97b148caa17c4bd31b0a68a to your computer and use it in GitHub Desktop.
gpiozero led button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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