clickButton
clickButton copied to clipboard
Add user read function
Adds a new constructor in which a user defined function can be used read the pin. Useful if you need to read a button that is attached to an I/O expander.
Example:
bool readButton(uint8_t pin){
return IOExp.digitalRead(pin);
}
ClickButton Button(readButton, USER_BUTTON_IOEXP_PIN, LOW, 2);