diff --git a/testled.py b/testled.py new file mode 100755 index 0000000..b87b6b4 --- /dev/null +++ b/testled.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +import RPi.GPIO as GPIO +import time + +phy_led = [8, 10, 12, 16, 18, 22, 24, 26, 32, 36, 38, 40, + 37, 35, 33, 31, 29, 23, 21, 19, 15, 13, 11, 7, 5, 3]; + +print 'Pi Board Information' +print '---------------------' +#for key,val in GPIO.RPI_INFO.items(): +# print '%s => %s'%(key,val) +#response = raw_input('\nIs this board info correct (y/n) ? ').upper() + +GPIO.setmode(GPIO.BOARD) + +myLED=15 +GPIO.setup(myLED, GPIO.OUT) +while True: + GPIO.output(myLED,True) + print 'on ',myLED + time.sleep(2) + GPIO.output(myLED,False) + print 'off',myLED + time.sleep(2) +