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

Interfacing (DSI, CSI, I2C, etc.) • Working example of a button with the GPIOd Python API

$
0
0
For some reason (possibly because it doesn't exist) I cannot find a functional example of working button code using the python implementation of the gpiod api, and I cannot seem to get it to work using something similar to the example in this TomsHardware example which uses an outdated version of the gpiod lib:

https://www.tomshardware.com/how-to/con ... h-python-3

I can get LED's to work but apparently a button's state doesn't change to active when a button is pushed. Maybe I'm looking at the wrong thing? Maybe I'm doing something else wrong, but I have no baseline to check from - hence I'm trying to find working example code. I'm sure there's something I'm missing, but I do not know what that is.

Any helpful pointers on where I might look for something like this?

Appreciate any help anyone can offer.

Thank you in advance!

Statistics: Posted by utdream — Fri Mar 29, 2024 5:55 pm — Replies 0 — Views 10



Viewing all articles
Browse latest Browse all 4474

Trending Articles