button icon indicating copy to clipboard operation
button copied to clipboard

Library does not support buttons with pull down resistors

Open divinofire opened this issue 4 years ago • 8 comments

I have a working project, it's stressful and error-prone for me to open it and change the button connection with a pull-down resistor to a pull-up resistor. I would like to just program the buttons to support debounce through the programming interface without modifying the hardware.

divinofire avatar Sep 08 '21 22:09 divinofire

Dear Divino-Fire, The library has not supported pull-down resistor yet. We planed to add it in the next release. But we have not had a specific release date yet.

ArduinoGetStarted avatar Sep 09 '21 00:09 ArduinoGetStarted

I am 100% for inverted buttons as well to be added. Btw I am an electrician with hundred years of experience, and since I was in school, the ON was always when something is HIGH, so I always design my projects to be LOW = OFF, HIGH = ON. Anyway, free software so nothing to complain about ;-)

homonto avatar Nov 09 '22 12:11 homonto

Dear @homonto Me too, I like to design like that. But parts of the world does not like that. I think that is why the concepts "Low trigger", "High trigger", "Normally Open", "Normally Closed" appears

ArduinoGetStarted avatar Nov 10 '22 00:11 ArduinoGetStarted

HI @ArduinoGetStarted! Just wondering if the library has been updated to support pull-down resistors. I am trying to use this on the Adafruit ESP32-S2 Reverse TFT that has two buttons that are normally low, and one button that is normally high.

jimtran93 avatar Mar 09 '23 20:03 jimtran93

Hi I am also wondering if there is pulldown support yet. I hac a project that uses 3 buttons in a pulldown configuration. in 3 GPIOs that do not have internal pull up or down resistors

hselomein avatar Nov 28 '23 05:11 hselomein

Hello,

Thank you for your interest in the ezButton library.

Unfortunately, until now, I still have no time to update it to support the pulldown. I am sorry for this inconvenience!

Have a nice day! Best regards.

On Tue, Nov 28, 2023 at 2:28 PM hselomein @.***> wrote:

Hi I am also wondering if there is pulldown support yet. I hac a project that uses 3 buttons in a pulldown configuration. in 3 GPIOs that do not have internal pull up or down resistors

— Reply to this email directly, view it on GitHub https://github.com/ArduinoGetStarted/button/issues/7#issuecomment-1829131753, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZMLXDRHCJGMTYMZDFILYDYGVZBRAVCNFSM5DVY4KCKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBSHEYTGMJXGUZQ . You are receiving this because you were mentioned.Message ID: @.***>

ArduinoGetStarted avatar Nov 28 '23 05:11 ArduinoGetStarted

Hi I am also wondering if there is pulldown support yet. I hac a project that uses 3 buttons in a pulldown configuration. in 3 GPIOs that do not have internal pull up or down resistors

hi @hselomein use this one: spacehuhn/SimpleButton - it has full config including pullup and down

homonto avatar Nov 28 '23 06:11 homonto

If you use pulldown resistors, you can make use of these bits:

https://github.com/ArduinoGetStarted/button/blob/2b2d1200d2bc0c7b28998ba25a32f825175bc3a5/src/ezButton.h#L57

https://github.com/ArduinoGetStarted/button/blob/2b2d1200d2bc0c7b28998ba25a32f825175bc3a5/src/ezButton.cpp#L34-L43

and write:

ezButton button(7,INPUT); // rely on external pulldown resistor

or if you are on a device with INPUT_PULLDOWN you can:

ezButton button(7,INPUT_PULLDOWN); // use internal pulldown resistor

drf5n avatar Aug 08 '24 01:08 drf5n