You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using the gpio-buttons plugin without a hardware debouncing of the input pins, at least in my case, often leads to bouncing effects (e.g. pressing play/stop one time leads to a stop and direct restart). While this is no problem for a shutdown button or maybe even a volume +/- button, it can be quite annoying on a play/stop button.
As far as I found out, the used onoff library for the Gpio reading already provides a software debounce, which works flawlessly for me.
Wouldn't it be meaningful to generally activate this debouncing in gpio-buttons or maybe make it configurable?
I just had to change this line of code in index.js of gpio-buttons:
currently: var j = new Gpio(pin,'in','both');
modified: var j = new Gpio(pin,'in','both', {debounceTimeout: 50});
I chose 50ms as debounce value, since I don't think a quicker reaction is necessary, but probably this value could also be reduced to 10-20ms, if desired.
The text was updated successfully, but these errors were encountered:
Since I am new to GitHub, please tell me, if this location is wrong for this request or if an issue is the wrong way to ask for this modification. :)
Hi I have faced the same issue, sometimes the play pause button works well sometimes it bounces. - not often but it happen, I like your idea to activate the debounce, then I would save a piece of hardware in my player
Hello,
using the gpio-buttons plugin without a hardware debouncing of the input pins, at least in my case, often leads to bouncing effects (e.g. pressing play/stop one time leads to a stop and direct restart). While this is no problem for a shutdown button or maybe even a volume +/- button, it can be quite annoying on a play/stop button.
As far as I found out, the used onoff library for the Gpio reading already provides a software debounce, which works flawlessly for me.
Wouldn't it be meaningful to generally activate this debouncing in gpio-buttons or maybe make it configurable?
I just had to change this line of code in index.js of gpio-buttons:
currently:
var j = new Gpio(pin,'in','both');
modified:
var j = new Gpio(pin,'in','both', {debounceTimeout: 50});
I chose 50ms as debounce value, since I don't think a quicker reaction is necessary, but probably this value could also be reduced to 10-20ms, if desired.
The text was updated successfully, but these errors were encountered: