06-29-2020, 12:23 PM
(This post was last modified: 06-29-2020, 12:56 PM by TheOldPresbyope.
Edit Reason: added a parenthetical
)
You have me there. Like I said, I haven't done any digital control work with an RPi and haven't explored RPi.GPIO.
If I understand your intent, it shouldn't matter if the event is triggered when you press the button or when you press and release the button.
Looking at /var/www/command/gpio-buttons.py, right now you're detecting the release, e.g., GPIO.RISING.
What happens if you reverse the detection polarity to GPIO.FALLING? [added in edit: along with an appropriate change to the call-back function, of course.]
This is a band-aid solution but nothing ventured, nothing gained. I'd still want to understand what's causing the occasional detecting of a rising edge with no button activity, but I think that's a question better suited asked of the RPi.GPIO maintainer Ben Croston (see, e.g., https://sourceforge.net/p/raspberry-gpio...n/tickets/).
Regards,
Kent
If I understand your intent, it shouldn't matter if the event is triggered when you press the button or when you press and release the button.
Looking at /var/www/command/gpio-buttons.py, right now you're detecting the release, e.g., GPIO.RISING.
What happens if you reverse the detection polarity to GPIO.FALLING? [added in edit: along with an appropriate change to the call-back function, of course.]
This is a band-aid solution but nothing ventured, nothing gained. I'd still want to understand what's causing the occasional detecting of a rising edge with no button activity, but I think that's a question better suited asked of the RPi.GPIO maintainer Ben Croston (see, e.g., https://sourceforge.net/p/raspberry-gpio...n/tickets/).
Regards,
Kent