From 549516cf1c08c9de4e423d0f71422ba0a739ed31 Mon Sep 17 00:00:00 2001 From: Kinder College Teilnehmer Date: Fri, 6 Jan 2023 21:14:11 +0100 Subject: [PATCH] update --- testled.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/testled.py b/testled.py index 81f0bb8..c28b4c4 100755 --- a/testled.py +++ b/testled.py @@ -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)