Namespace eva¶
Classes¶
| Type | Name |
|---|---|
| class | AnalogPinReader <PIN, PIN_MODE> Reads analog pin value. |
| class | BinarizeEqDecor <class TReader, ACTIVATES_ON> Decorator that converts reading to binary based on level. |
| class | BinarizeGtDecor <class TReader, THRESHOLD> Decorator that converts analog reading to binary based on 'greater then' threshold condition. |
| class | BinarizeLtDecor <class TReader, THRESHOLD> Decorator that converts analog reading to binary based on 'less then' threshold condition. |
| class | BlinkingIndicator Indicator that blinks with specified period and duty cycle. |
| class | Button <class TReader> Button with press/release and click detection. |
| struct | CallbackInfo |
| class | CountdownIndicator Indicator that blinks a specified number of times then notifies listener. |
| class | CountdownTimer Timer that fires repeatedly at fixed intervals. |
| class | DebounceDecor <class TReader> Decorator that stabilizes readings by requiring value to be stable for a period. |
| class | DelayTimer One-shot timer that fires after a delay. |
| class | DigitalPinReader <PIN, PIN_MODE> Reads digital pin value. |
| class | Handler <class T> Handler that calls a member method. |
| class | HandlerF Handler that calls a free function. |
| class | Heartbeat Base class for components that need periodic updates. |
| class | IHandler Interface for message handlers. |
| class | IReader Interface for value readers. |
| class | IReaderAdapter <class T> Adapter that converts any class with getValue() into an IReader . |
| class | Indicator Basic indicator (LED) control. |
| class | Joystick <class TReader, MIN_POS, MIDDLE_POS, MAX_POS> Joystick axis reader (range 1000-1500-2000) with trim adjustment. |
| class | List <class ItemClass> Simple singly-linked list container. |
| struct | ListIterator <class ItemClass> Iterator node for List . |
| class | QuantizeDecor <class TReader, LEVELS> Decorator that quantizes analog readings to discrete levels. |
| class | RepeatTimer Timer that fires repeatedly at fixed intervals. |
| class | ScrollButton <class TReader> Button with auto-repeat (typematic) functionality. |
| class | Slider <class TReader, MIN_POS, MAX_POS> Maps analog readings to 1000-2000 range. |
| class | Switch <class TReader> Universal switch/button class for multi-valued input sources. |
| class | Tickable Base class for objects that need periodic updates. |
Public Types¶
| Type | Name |
|---|---|
| typedef Button< BinarizeEqDecor< DebounceDecor< DigitalPinReader< PIN, PIN_MODE > >, ACTIVATES_ON > > | PinButton Digital pin button with debouncing and level normalization. |
| typedef Joystick< AnalogPinReader< PIN, PIN_MODE >, MIN_POS, MIDDLE_POS, MAX_POS > | PinJoystick Pin-based joystick with custom center position. |
| typedef Button< QuantizeDecor< DebounceDecor< AnalogPinReader< PIN, PIN_MODE > >, LEVELS... > > | PinMultiButton Multiple buttons on a single ADC pin using resistor ladder. |
| typedef Switch< QuantizeDecor< DebounceDecor< AnalogPinReader< PIN, PIN_MODE > >, LEVELS... > > | PinMultiSwitch Multiple switches on a single ADC pin using resistor ladder. |
| typedef Button< BinarizeEqDecor< DebounceDecor< DigitalPinReader< PIN, PIN_MODE > >, ACTIVATES_ON > > | PinScrollButton Digital pin key-button with debouncing and level normalization. |
| typedef ScrollButton< QuantizeDecor< DebounceDecor< AnalogPinReader< PIN, PIN_MODE > >, LEVELS... > > | PinScrollMultiButton Multiple key-buttons on a single ADC pin using resistor ladder. |
| typedef Slider< AnalogPinReader< PIN, PIN_MODE >, MIN_POS, MAX_POS > | PinSlider Pin-based slider mapping analog readings to 0-255 range. |
| typedef Switch< BinarizeEqDecor< DebounceDecor< DigitalPinReader< PIN, PIN_MODE > >, ACTIVE_LEVEL > > | PinSwitch Digital pin switch with debouncing and level normalization. |
| typedef Joystick< AnalogPinReader< PIN, PIN_MODE >, MIN_POS,(MAX_POS+MIN_POS)/2, MAX_POS > | PinSymmetricJoystick Pin-based joystick with symmetric range (MIN_POS to MAX_POS, center at midpoint). |
| typedef Button< BinarizeEqDecor< DebounceDecor< DigitalPinReader< PIN, INPUT_PULLUP > >, LOW > > | PullUpButton Pull-up button (active LOW, connect to GND). |
| typedef ScrollButton< BinarizeEqDecor< DebounceDecor< DigitalPinReader< PIN, INPUT_PULLUP > >, LOW > > | PullupScrollButton Pull-up key-button (active LOW, connect to GND). |
| typedef PinSwitch< PIN, INPUT_PULLUP, LOW > | PullupSwitch Pull-up switch (active LOW, connect to GND). |
Public Static Attributes¶
| Type | Name |
|---|---|
| const unsigned short | DEBOUNCE_DELAY = 120 |
| const unsigned short | LONGPRESS_DELAY = 750 |
| const unsigned char | ON_CHANGE = 0x04 |
| const unsigned char | ON_LONGCLICK = 0x10 |
| const unsigned char | ON_LONGPRESS = 0x20 |
| const unsigned char | ON_PRESS = 0x01 |
| const unsigned char | ON_RELEASE = 0x02 |
| const unsigned char | ON_REPEATKEY = 0x40 |
| const unsigned char | ON_SHORTCLICK = 0x08 |
| const unsigned short | REPEAT_DELAY = 300 |
Public Functions¶
| Type | Name |
|---|---|
| void | tac () Triggers all tickable objects to update. |
Public Static Functions¶
| Type | Name |
|---|---|
| bool | in_between (signed short x, signed short a, signed short b) |
Public Types Documentation¶
typedef PinButton¶
Digital pin button with debouncing and level normalization.
using eva::PinButton = Button<BinarizeEqDecor<DebounceDecor<DigitalPinReader<PIN, PIN_MODE>>, ACTIVATES_ON>>;
Combines: * DigitalPinReader for raw pin reading * DebounceDecor for debouncing (120ms stability) * BinarizeEqDecor for mapping to active/inactive based on specified level
Long click threshold is fixed at 750ms.
Template parameters:
PINArduino pin numberPIN_MODEPin mode (INPUT, INPUT_PULLUP, etc.)ACTIVATES_ONLevel that means "pressed" (LOW or HIGH)
typedef PinJoystick¶
Pin-based joystick with custom center position.
using eva::PinJoystick = Joystick<AnalogPinReader<PIN, PIN_MODE>, MIN_POS, MIDDLE_POS, MAX_POS>;
Template parameters:
PINArduino pin numberPIN_MODEPin mode (usually INPUT)MIN_POSMinimum analog readingMIDDLE_POSCenter position readingMAX_POSMaximum analog reading
typedef PinMultiButton¶
Multiple buttons on a single ADC pin using resistor ladder.
using eva::PinMultiButton = Button<QuantizeDecor<DebounceDecor<AnalogPinReader<PIN, PIN_MODE>>, LEVELS...>>;
Hardware connection:
ADC Pin -----+--R1--+--R2--+-- ... -Rn-+
(analog in) | | | |
\ \ \ \
| | | |
GND -----+------+------+-- ... ----+
Each button produces a different ADC value when pressed. The QuantizeDecor maps these values to discrete button codes (1, 2, 3...). DebounceDecor provides debouncing.
Generates standard button events for each button, with the button number encoded in the event mask.
Template parameters:
PINArduino analog pin numberPIN_MODEPin mode (usually INPUT)LEVELSThreshold values for each button (expected ADC readings)
See also: PinMultiSwitch For use cases without click detection
typedef PinMultiSwitch¶
Multiple switches on a single ADC pin using resistor ladder.
using eva::PinMultiSwitch = Switch<QuantizeDecor<DebounceDecor<AnalogPinReader<PIN, PIN_MODE>>, LEVELS...>>;
Hardware connection:
ADC Pin -----+--R1--+--R2--+-- ... -Rn-+
(analog in) | | | |
\ \ \ \
| | | |
GND -----+------+------+-- ... ----+
Each switch produces a different ADC value when activated. The QuantizeDecor maps these values to discrete level codes (1, 2, 3...). DebounceDecor provides debouncing.
Template parameters:
PINArduino analog pin numberPIN_MODEPin mode (usually INPUT)LEVELSThreshold values for each switch (expected ADC readings)
typedef PinScrollButton¶
Digital pin key-button with debouncing and level normalization.
using eva::PinScrollButton = Button<BinarizeEqDecor<DebounceDecor<DigitalPinReader<PIN, PIN_MODE>>, ACTIVATES_ON>>;
Combines: * DigitalPinReader for raw pin reading * DebounceDecor for debouncing (120ms stability) * BinarizeEqDecor for mapping to active/inactive based on specified level
Long click threshold is fixed at 750ms.
Template parameters:
PINArduino pin numberPIN_MODEPin mode (INPUT, INPUT_PULLUP, etc.)ACTIVATES_ONLevel that means "pressed" (LOW or HIGH)
typedef PinScrollMultiButton¶
Multiple key-buttons on a single ADC pin using resistor ladder.
using eva::PinScrollMultiButton = ScrollButton<QuantizeDecor<DebounceDecor<AnalogPinReader<PIN, PIN_MODE>>, LEVELS...>>;
Hardware connection:
ADC Pin -----+--R1--+--R2--+-- ... -Rn-+
(analog in) | | | |
\ \ \ \
| | | |
GND -----+------+------+-- ... ----+
Each button produces a different ADC value when pressed. The QuantizeDecor maps these values to discrete button codes (1, 2, 3...). DebounceDecor provides debouncing.
Generates standard button events for each button, with the button number encoded in the event mask.
Template parameters:
PINArduino analog pin numberPIN_MODEPin mode (usually INPUT)LEVELSThreshold values for each button (expected ADC readings)
See also: PinMultiSwitch For use cases without click detection
typedef PinSlider¶
Pin-based slider mapping analog readings to 0-255 range.
using eva::PinSlider = Slider<AnalogPinReader<PIN, PIN_MODE>, MIN_POS, MAX_POS>;
Template parameters:
PINArduino pin numberPIN_MODEPin mode (usually INPUT)MIN_POSMinimum analog readingMAX_POSMaximum analog reading
typedef PinSwitch¶
Digital pin switch with debouncing and level normalization.
using eva::PinSwitch = Switch<BinarizeEqDecor<DebounceDecor<DigitalPinReader<PIN, PIN_MODE>>, ACTIVE_LEVEL>>;
Combines: * DigitalPinReader for raw pin reading * DebounceDecor for debouncing (120ms stability) * BinarizeEqDecor for mapping to active/inactive based on specified level
Template parameters:
PINArduino pin numberPIN_MODEPin mode (INPUT, INPUT_PULLUP, etc.)ACTIVE_LEVELLevel that means active (LOW or HIGH)
typedef PinSymmetricJoystick¶
Pin-based joystick with symmetric range (MIN_POS to MAX_POS, center at midpoint).
using eva::PinSymmetricJoystick = Joystick<AnalogPinReader<PIN, PIN_MODE>, MIN_POS, (MAX_POS + MIN_POS) / 2, MAX_POS>;
Template parameters:
PINArduino pin numberPIN_MODEPin mode (usually INPUT)MIN_POSMinimum analog readingMAX_POSMaximum analog reading
typedef PullUpButton¶
Pull-up button (active LOW, connect to GND).
using eva::PullUpButton = Button<BinarizeEqDecor<DebounceDecor<DigitalPinReader<PIN, INPUT_PULLUP>>, LOW>>;
Convenience alias for the most common Arduino button wiring: * Pin set to INPUT_PULLUP * Button connects pin to GND when pressed
Generates all button events with proper debouncing.
Template parameters:
PINArduino pin number
typedef PullupScrollButton¶
Pull-up key-button (active LOW, connect to GND).
using eva::PullupScrollButton = ScrollButton<BinarizeEqDecor<DebounceDecor<DigitalPinReader<PIN, INPUT_PULLUP>>, LOW>>;
Convenience alias for the most common Arduino button wiring: * Pin set to INPUT_PULLUP * Button connects pin to GND when pressed
Generates all button events with proper debouncing.
Template parameters:
PINArduino pin number
typedef PullupSwitch¶
Pull-up switch (active LOW, connect to GND).
using eva::PullupSwitch = PinSwitch<PIN, INPUT_PULLUP, LOW>;
Convenience alias for the most common Arduino switch wiring: * Pin set to INPUT_PULLUP * Switch connects pin to GND when pressed
Template parameters:
PINArduino pin number
Public Static Attributes Documentation¶
variable DEBOUNCE_DELAY¶
const unsigned short eva::DEBOUNCE_DELAY;
variable LONGPRESS_DELAY¶
const unsigned short eva::LONGPRESS_DELAY;
variable ON_CHANGE¶
const unsigned char eva::ON_CHANGE;
variable ON_LONGCLICK¶
const unsigned char eva::ON_LONGCLICK;
variable ON_LONGPRESS¶
const unsigned char eva::ON_LONGPRESS;
variable ON_PRESS¶
const unsigned char eva::ON_PRESS;
variable ON_RELEASE¶
const unsigned char eva::ON_RELEASE;
variable ON_REPEATKEY¶
const unsigned char eva::ON_REPEATKEY;
variable ON_SHORTCLICK¶
const unsigned char eva::ON_SHORTCLICK;
variable REPEAT_DELAY¶
const unsigned short eva::REPEAT_DELAY;
Public Functions Documentation¶
function tac¶
Triggers all tickable objects to update.
void eva::tac ()
Public Static Functions Documentation¶
function in_between¶
static inline bool eva::in_between (
signed short x,
signed short a,
signed short b
)
The documentation for this class was generated from the following file src/evaBlinkingIndicator.h