Last active
August 29, 2015 14:13
-
-
Save salexkidd/6bb0fc12b3cdfebe858b to your computer and use it in GitHub Desktop.
Led on off
This file contains 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
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
import time | |
import random | |
IO_PIN = 15 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(IO_PIN, GPIO.OUT) | |
try: | |
while True: | |
time.sleep(1000) | |
GPIO.output(IO_PIN, True) | |
time.sleep(1000) | |
GPIO.output(IO_PIN, False) | |
except KeyboardInterrupt: | |
print "clean up" | |
GPIO.cleanup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment