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

Python • lgpio.error: 'GPIO busy'

$
0
0
I am using rpi5 with bookwarm os.
I have run below code. It run code 1st time properly,
If I run 2nd time, it gives error "lgpio.error: 'GPIO busy'"

Below is code

Code:

from gpiozero import LEDfrom time import sleepPUL = LED(17)DIR = LED(27)DIR.on()PUL.off()sleep(1)while True:    PUL.on()    sleep(0.01)    PUL.off()    sleep(0.01)
should I use python3-gpiod or how I can remove this error

Statistics: Posted by spatil — Fri Apr 26, 2024 12:32 pm



Viewing all articles
Browse latest Browse all 1225

Trending Articles