Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save murilopontes/12c6587437b409a61150 to your computer and use it in GitHub Desktop.
Save murilopontes/12c6587437b409a61150 to your computer and use it in GitHub Desktop.
#!/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