EvoTriButton#
-
class EvoTriButton#
Initialisation & Setup
-
EvoTriButton::EvoTriButton(int pin)#
Constructor for TriButton.
- Parameters:
pin – The TriButton GPIO pin.
Control Functions
-
int EvoTriButton::getButton(int button = 0)#
Gets the state of the selected button.
- Parameters:
button – The button to check. (0 = Raw | 1 = Black | 2 = Red | 3 = Blue).
- Returns:
The state of the button. (0 = RELEASED | 1 = PRESSED).
-
int EvoTriButton::getButtonPressed()#
Gets which button is currently pressed.
- Returns:
The button number that is pressed (0 = None | 1 = Black | 2 = Red | 3 = Blue).
-
void EvoTriButton::waitForPress(int button, int debouncems = 200)#
Waits for selected button pressed before continuing execution.
- Parameters:
button – The button to check. (1 = Black | 2 = Red | 3 = Blue).
debouncems – Delay in milliseconds after button is pressed.
-
void EvoTriButton::waitForRelease(int debouncems = 200)#
Waits for selected button released before continuing execution.
- Parameters:
debouncems – Delay in milliseconds after button is released.
-
void EvoTriButton::waitForBump(int button, int debouncems = 200)#
Waits for selected button pressed and released before continuing execution.
- Parameters:
button – The button to check. (1 = Black | 2 = Red | 3 = Blue).
debouncems – Delay in milliseconds after button is pressed and released.