Closed vazquezjm closed 4 years ago
Hi @vazquezjm I'll take a look at this and get back to you later on today.
Hi @vazquezjm, I am pretty sure that the problem is related to your hardware. You are connecting your button to vcc and you are using the library as if it is connected to gnd. Please try the same connecting the button to gnd and let us know if it worked
Please try the same connecting the button to gnd and let us know if it worked
It works now!
Is there a way I can use it connected to Vcc? Thx
@vazquezjm
Passing false
as the third argument on the EasyButton class constructor will invert the default button's logic as described in https://easybtn.earias.me/docs/fundamentals.
Please use the following example as reference:
#define PWR_BTN_PIN 26
uint8 debounce = 35;
bool pullup = true;
bool invert = false;
EasyButton powerButton(PWR_BTN_PIN, debounce, pullup, invert);
Thank you @evert-arias, that did the trick!
Hi there.
I wired my test Arduino Pro Mini as follows:
When I run the
onPressedForDuration()
example (running on EasyButton v1.2.0)As soon as I press the button, I get "Button has been pressed for the given duration!", although I set duration to 3000.
Any suggestion?
Thanks!