Last active
January 17, 2016 17:21
-
-
Save drocco007/ea84cd3710fd7b93088c to your computer and use it in GitHub Desktop.
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 time import sleep | |
| from gpiozero import LED | |
| led = LED(17) | |
| while True: | |
| led.toggle() | |
| sleep(0.250) |
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
| pi@raspberrypi:~ $ gpio mode 0 out | |
| pi@raspberrypi:~ $ gpio write 0 1 | |
| pi@raspberrypi:~ $ gpio write 0 0 |
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
| pi@raspberrypi:~ $ python | |
| Python 2.7.9 (default, Mar 8 2015, 00:52:26) | |
| [GCC 4.9.2] on linux2 | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from gpiozero import LED | |
| >>> led = LED(17) | |
| >>> led.on() | |
| >>> led.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment