You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you so much for this library.
I'm using esp32 board when I tried to run this code, it couldn't handle btn.isHeld()==2 always perform btn.isHeld()==1
#include"EMFButton.h"EMFButtonbtn (3, HIGH_P);
voidsetup() {
Serial.begin(9600);
}
voidloop() {
btn.tick();
if (btn.isHeld()==1)
Serial.println(" ONE");
if (btn.isHeld()==2)
Serial.println("TWO");
if (btn.hasClicks() ==3)
Serial.println("THREE");
}
Second question, if we use HIGH_P, does it mean only INPUT or INPUT_PULLUP?
The text was updated successfully, but these errors were encountered:
isHeld function just lets us know if button was pressed more than n milliseconds and it is bool value. For getting clicks amount after pressing button for n milliseconds(just clicks + long pressing) you need to use hasClicksWithHeld function.
HIGH_P sets INPUT_PULLUP
Let me know if there are mistakes in library's code
Thank you so much for this library.
I'm using esp32 board when I tried to run this code, it couldn't handle
btn.isHeld()==2
always performbtn.isHeld()==1
Second question, if we use
HIGH_P
, does it mean onlyINPUT
orINPUT_PULLUP
?The text was updated successfully, but these errors were encountered: