Simple Push Button libarry for ESP32, ESP8266 using interrupts.
Currently the library only supports polling method.
This library uses INPUT_PULLUP pin mode by default, so please use the pins which support internal pullup resistors.
If the pin has no internal pullup resistor, please add an external pullup resistor to your circuit as below:
int8_t add(byte btn_pin): Add a button to usebool remove(byte btn_pin): Remove a buttonunsigned long long pressedTime(uint8_t btn_pin): Get the pressed time of a buttonbool clicked(uint8_t btn_pin): Check if a button is clickedHumaButtonStates_e state(uint8_t btn_pin): Get current button's statevoid setDebounce(uint16_t debounce): Set debounce time for all buttons. Default is 30msvoid setLongPressClicked(uint8_t btn_pin, bool val): Set Long Press Clicked config
- Email: contacts.humacompany@gmail.com
- Facebook: https://www.facebook.com/humacompanyvn
