◆ AnalogButtons()
AnalogButtons::AnalogButtons |
( |
uint8_t |
pin, |
|
|
uint8_t |
mode = INPUT , |
|
|
uint16_t |
debounce = 5 , |
|
|
uint8_t |
margin = 10 |
|
) |
| |
Creates the instance handling an analog pin to support multiple buttons.
- Parameters
-
pin | the analog pin this instance will manage |
mode | the pin mode (defaults to INPUT) |
debounce | determines the minimum duration a button must remain pressed to be considered being clicked in order to avoid false positives (defaults to 5) |
margin | takes into account slight resistance fluctuations and ADC errors transforming the button value into a range (defaults to 10) |
◆ add()
void AnalogButtons::add |
( |
Button |
button | ) |
|
Adds a button to this handler.
◆ check()
void AnalogButtons::check |
( |
| ) |
|
Must be executed perioodically in order to have the button functions activated accordingly to the button pressed.
The documentation for this class was generated from the following files: