evert-arias / EasyButton

Arduino library for debouncing momentary contact switches, detect press, release, long press and sequences with event definitions and callbacks.
https://easybtn.earias.me
MIT License
447 stars 62 forks source link

Add ADC filter to remove jitters on touchRead #45

Closed eppfel closed 2 years ago

eppfel commented 4 years ago

Not sure, if this is the best way to solve this, but both esp32 dev modules I'm working on have these periodic drops. Hence, I get false touch events.

I added the dependency 1.30 by using their exponential ADC Filter.

It should be possible to implement the filter in here to remove the dependency.

evert-arias commented 3 years ago

Hi @eppfel, this looks good to me. I will test it as soon as I have a chance and comment on it. Thanks

georgevbsantiago commented 2 years ago

Hi, I would like to thank you for developing this excellent library.

Recently, when using the .isPressed() function to monitor pins (D1, D2 and D3) of ESP8266 in pull-down buttons, I identified the phantom triggering of pin D3 repeatedly. I believe it has to do with the PR solution to eliminate the problem.

In my case I had to use pin D6 instead of D3 to implement the button. Any prospects of testing and accepting PR?