mathertel / OneButton

An Arduino library for using a single button for multiple purpose input.
http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
Other
920 stars 230 forks source link

ESP32: Pull-down support #106

Closed ModischFabrications closed 1 year ago

ModischFabrications commented 2 years ago

OneButton(pin, true, true) supports only pull-ups, but some chips (notably the ESP32) offer pull-down as well. Is there any other method I couldn't find or are users limited to only pull-ups?

mathertel commented 1 year ago

Have a look at the example SpecialInput.ino. Here the pinMode is set outside of the library and you can set it for ESP32 with a INPUT_PULLDOWN.