Serial Wombat Arduino Library
|
SerialWombat18CapTouch, SerialWombatDebouncedInput and SerialWombatMatrixButton inherit from this class. More...
#include <SerialWombatAbstractButton.h>
Public Member Functions | |
SerialWombatAbstractButton () | |
virtual bool | digitalRead ()=0 |
Returns the state of the input. More... | |
virtual uint16_t | readDurationInTrueState_mS ()=0 |
return the number of mS that the input has been in true state More... | |
virtual uint16_t | readDurationInFalseState_mS ()=0 |
return the number of mS that the input has been in false state More... | |
virtual bool | readTransitionsState (bool resetTransitionCounts=true)=0 |
Queries the number of transistions that have occured on the debounced input. More... | |
Public Attributes | |
uint16_t | transitions = 0 |
Number of transitions returned by last call to readTransitionsState() More... | |
SerialWombat18CapTouch, SerialWombatDebouncedInput and SerialWombatMatrixButton inherit from this class.
This class provides a basic set of interface for any pin mode class that has a button-like interface It allows classes like SerialWombatButtonCounter to work uniformly with any button-like class.
|
inline |
|
pure virtual |
Returns the state of the input.
This function reads the status of an input
Implemented in SerialWombatMatrixButton, SerialWombat18CapTouch, and SerialWombatDebouncedInput.
|
pure virtual |
return the number of mS that the input has been in false state
Note that this value starts incrementing after any debounce period, not after the physical pin transition.
Implemented in SerialWombatMatrixButton, SerialWombat18CapTouch, and SerialWombatDebouncedInput.
|
pure virtual |
return the number of mS that the input has been in true state
Note that this value starts incrementing after the debounce period, not after the physical pin transition.
Implemented in SerialWombatMatrixButton, SerialWombat18CapTouch, and SerialWombatDebouncedInput.
|
pure virtual |
Queries the number of transistions that have occured on the debounced input.
This function queries the debounced input for current state and transitions since last call. transition count is put in the global member transitions. The debounced input in the Serial Wombat resets its count to zero after this call.
Implemented in SerialWombat18CapTouch, and SerialWombatDebouncedInput.
uint16_t SerialWombatAbstractButton::transitions = 0 |
Number of transitions returned by last call to readTransitionsState()