Maybe add a line in the button_pressed function so you can see that you have pressed a button?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:
print ("button pressed")
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