Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
|
Represents a single button in a matrix configuration. More...
#include <ArduinoMatrixButton.h>
Public Member Functions | |
ArduinoMatrixButton (inputid_t id, inputpin_t colPin, inputpin_t rowPin) | |
Creates a new button in a matrix configuration. More... | |
inputpin_t | getColPin () const |
Gets the pin attached to the matrix column for this button. More... | |
inputpin_t | getRowPin () const |
Gets the pin attached to the matrix row for this button. More... | |
![]() | |
IButton (inputid_t id, inputtime_t debounceDelay=50) | |
Creates a new button. More... | |
inputtype_t | type () const |
Retrieves the type of this device. More... | |
bool | setDebounceDelay (inputtime_t debounce) |
Sets the debounce delay time. More... | |
inputtime_t | getDebounceDelay () const |
Gets the current debounce delay time. More... | |
bool | poll () |
Polls this input device for change. More... | |
bool | isActive () const |
Determines if the button is currently active. More... | |
inputtime_t | lastStateChange () const |
Returns the time of the last state change. More... | |
inputtime_t | lastActiveDuration () const |
Returns the duration for which the button was last active. More... | |
![]() | |
IInputDevice (inputid_t id) | |
Creates a new input device. More... | |
inputid_t | getID () const |
Retrieves the ID of this device. More... | |
Protected Member Functions | |
uint8_t | getPhysicalState () const |
Gets the current physical state of the button. More... | |
Represents a single button in a matrix configuration.
ArduinoMatrixButton::ArduinoMatrixButton | ( | inputid_t | id, |
inputpin_t | colPin, | ||
inputpin_t | rowPin | ||
) |
Creates a new button in a matrix configuration.
id | ID of the button |
colPin | Pin connected to the matrix column of the button |
rowPin | PIn connected to the matrix row of the button |
|
inline |
Gets the pin attached to the matrix column for this button.
|
protectedvirtual |
Gets the current physical state of the button.
Implements IButton.
|
inline |
Gets the pin attached to the matrix row for this button.