JChristensen / JC_Button

Arduino library to debounce button switches, detect presses, releases, and long presses
GNU General Public License v3.0
425 stars 102 forks source link

ESP Support? Pull-Ups not being enabled #4

Closed hipotenusa closed 7 years ago

hipotenusa commented 7 years ago

Hi to All, Internal ESP12E pull ups are not being enabled with writing HIGH the digital input pin. Checked with SimpleOnOff example. Same example works as expected with Mega2560.

Using "pinMode(_pin, INPUT_PULLUP);" for enabling the pull ups fixes the issue on ESP12E. Checked with Mega2560 and also Ok.


if (_puEnable != 0) pinMode(_pin, INPUT_PULLUP); //enable pullup resistor else (pinMode(_pin, INPUT));