This commit is contained in:
br committed 2023-01-06 21:14:11 +01:00
1 parent 849e5f8d3e
commit 549516cf1c
1 file changed
+19 -10
+19 -10
View File
@@ -2,8 +2,11 @@
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];
#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];
phy_led = [8, 10, 12, 16, 18, 22, 26, 32, 36, 38, 40,
37, 35, 33, 31, 29, 23, 21, 15, 13, 11, 7, 5, 3];
print ('Pi Board Information')
print ('---------------------')
@@ -11,15 +14,21 @@ print ('---------------------')
# print '%s => %s'%(key,val)
#response = raw_input('\nIs this board info correct (y/n) ? ').upper()
#17,18,27,22,23,24,25, 4, 2, 3, 8, 7,10, 9,11,14,15,28,29,30,31
GPIO_23=22
GPIO_17=16
GPIOTEST=27
GPIO.setmode(GPIO.BOARD)
myLED=22
GPIO.setup(myLED, GPIO.OUT)
while True:
GPIO.output(myLED,True)
#17,18,27,22,23,24,25, 4, 2, 3, 8, 7,10, 9,11,14,15,28,29,30,31
myLED=GPIOTEST
#while True:
for myLED in phy_led:
print '. on . ',myLED
time.sleep(2)
GPIO.output(myLED,False)
GPIO.setup(myLED, GPIO.OUT)
GPIO.output(myLED,True)
time.sleep(0.5)
print '**off**',myLED
time.sleep(2)
GPIO.output(myLED,False)
time.sleep(0.5)