Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1277

Python • gpiozero and gpio 3 mystery...

$
0
0
If I use the following the leds light and go off as expected...

Code:

#!/usr/bin/python3import timefrom gpiozero import LEDpinList = [3, 4, 17, 27]led = [0] * len(pinList)for i in range(0,len(pinList)):    led[i] = LED(pinList[i])    led[i].on()    time.sleep(1)    led[i].off()
but with the following gpio3 led doesn't go off just dim... why ?

Code:

#!/usr/bin/python3import timefrom gpiozero import LEDpinList = [3, 4, 17, 27]for i in range(0,len(pinList)):    led = LED(pinList[i])    led.on()    time.sleep(1)    led.off()

Statistics: Posted by gordon77 — Fri Dec 22, 2023 1:29 pm



Viewing all articles
Browse latest Browse all 1277

Trending Articles