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

Troubleshooting • Re: gpiozero.LED leaves pins in floating state

$
0
0
Thanks all for the recommendation to upgrade to Bookworm.

System:
  • bookworm March 2024 release
  • Python 3.11.2
Unfortunately, the issue persisted on a fresh OS image. The pins were all low before the simple program's runtime and high (1.5V) afterwards. This was corroborated by viewing

Code:

rpi32@rpi32: $ pinctrl get 1919: op    -- | lo // GPIO19 = outputrpi32@rpi32: $ python /home/rpi32/Documents/probar.pyrpi32@rpi32 $ pinctrl get 1919: ip    -- | lo // GPIO19 = input
in terminal before and after.

However, with the available pinctrl functionality, this was corrected by adding the lines below:

Code:

from subprocess import runrun("pinctrl set 19 op", check=True, shell=true, text=True)
where now

Code:

rpi32@rpi32 $ pinctrl get 1919: op -- -- | low //GPIO19 = output
Do note that the "pinB.close()" was required in this instance.

I will try to have a Pi 4 ordered for testing a change of hardware later.

Statistics: Posted by anilles — Wed May 15, 2024 2:47 am



Viewing all articles
Browse latest Browse all 4151

Trending Articles