Created
June 30, 2014 17:58
-
-
Save murilopontes/12c6587437b409a61150 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
#!/usr/bin/python | |
import thread | |
import sys | |
import time | |
import Adafruit_BBIO.GPIO as GPIO | |
def gpio_test(pin): | |
while True: | |
print pin | |
GPIO.output(pin,GPIO.HIGH) | |
time.sleep(0.5) | |
GPIO.output(pin,GPIO.LOW) | |
time.sleep(0.5) | |
for y in [ "P8_", "P9_" ]: | |
for x in range(1,47): | |
try: | |
pin=y+str(x) | |
GPIO.setup(pin,GPIO.OUT) | |
thread.start_new_thread(gpio_test,(pin,)) | |
except: | |
pass | |
while True: | |
time.sleep(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment