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

Beginners • Re: Raspberry Pi 4 Bookworm - GPIOZero not working

$
0
0
Using your button code in Thonny at the Terminal
Shorting pin 3 to GND, triggers it all fine.

> %Run button_test.py
Hello!
Goodbye!
Hello!
Goodbye!
Hello!
Goodbye!



Bookworm 64bit as of today, 6.6.20
Pi 4 v1.5


Python 3.11.2 (/usr/bin/python3)
>>> from pkg_resources import require
>>> require('gpiozero')
[gpiozero 2.0 (/usr/lib/python3/dist-packages)]
Hello,
My experience is really weird. After reading through your post, it still does not work... and I left it for hours, when I came back it now is blinking.

What I did was to reimage a new SD card and tried it again and so far I am receiving a constant response

Maybe there are some tweaks that I did in the OS that could have affected my Raspberry Pi Bookworm OS when I was still using the RPI.GPIO.

I am still observing it right now but it appears to be working as of the moment.

And yes it is now using the LGPIOFactory

Code:

<gpiozero.pins.lgpio.LGPIOFactory object at 0x7fb1a79750>
I would like to thank you for taking the time to take a look at my problem. I will get back to you if something comes up.
I have just been used to working with RPI.GPIO and this gpiozero is fairly new to me.

Statistics: Posted by neliel123 — Sun Mar 24, 2024 3:27 am



Viewing all articles
Browse latest Browse all 5099

Trending Articles