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

Troubleshooting • Re: button stops listening further input after single press

$
0
0
Maybe add a line in the button_pressed function so you can see that you have pressed a button?

Code:

        print ("button pressed")
It works OK for me on a pizero2 running Bullseye 32-bit GUI.
I don't have a button connected so I use raspi-gpio to simulate one after starting the python script:

Code:

pi@pibull32:~ $ raspi-gpio set 18 op dhpi@pibull32:~ $ raspi-gpio set 18 op dl

Statistics: Posted by neilgl — Wed Aug 07, 2024 2:43 pm



Viewing all articles
Browse latest Browse all 5526

Trending Articles