Namespace eva¶
Classes¶
| Type | Name |
|---|---|
| class | AnalogMutablePinReader Reads analog pin value with runtime pin configuration. |
| class | AnalogPinReader <tPin, tPinMode> Reads analog pin value. |
| class | BinarizeEqDecor <class TReader, tActivatesOn> Decorator that converts reading to binary based on level equality. |
| class | BinarizeGtDecor <class TReader, THRESHOLD> Decorator that converts analog reading to binary based on 'greater than' threshold condition. |
| class | BinarizeLtDecor <class TReader, THRESHOLD> Decorator that converts analog reading to binary based on 'less than' 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 a specified number of times 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 | DigitalMutablePinReader Reads digital pin value with runtime pin configuration. |
| class | DigitalPinReader <tPin, tPinMode> 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, tMinPos, tMiddlePos, tMaxPos> Joystick axis reader (range -1000 .. 0 .. 1000) with trim adjustment. |
| class | List <class ItemClass> Simple singly-linked list container. |
| struct | ListIterator <class ItemClass> Iterator node for List . |
| struct | PinScrollMultiButton <tPin> |
| struct | PullupScrollButton <tPin> |
| struct | PullupSwitch <tPin> |
| class | QuantizeDecor <class TReader, tLevels> Decorator that quantizes analog readings to discrete levels. |
| class | RepeatTimer Timer that fires repeatedly at fixed intervals. |
| class | RingBuffer <typename T, N> Fixed-capacity circular ring buffer. |
| class | ScrollButton <class TReader> Button with auto-repeat (typematic) functionality. |
| class | Slider <class TReader, tMinPos, tMaxPos> Maps analog readings to 0-1000 range. |
| class | Switch <class TReader> Universal switch/button class for multi-valued input sources. |
| class | Tickable Base class for objects that need periodic updates. |
| class | ValueReader Simple stateful reader acting as a ground-level of proccessing pipe. |
Public Types¶
| Type | Name |
|---|---|
| typedef Button< BinarizeEqDecor< DebounceDecor< DigitalPinReader< tPin, tPinMode > >, tActivatesOn > > | PinButton Digital pin button with debouncing and level normalization. |
| typedef Joystick< AnalogPinReader< tPin, tPinMode >, tMinPos, tMiddlePos, tMaxPos > | PinJoystick Pin-based joystick with custom center position. |
| typedef Button< QuantizeDecor< DebounceDecor< AnalogPinReader< tPin, tPinMode > >, tLevels... > > | PinMultiButton Multiple buttons on a single ADC pin using resistor ladder. |
| typedef ScrollButton< QuantizeDecor< DebounceDecor< AnalogPinReader< tPin, tPinMode > >, tLevels... > > | PinMultiScrollButton Multiple key-buttons on a single ADC pin using resistor ladder. |
| typedef Switch< QuantizeDecor< DebounceDecor< AnalogPinReader< tPin, tPinMode > >, tLevels... > > | PinMultiSwitch Multiple switches on a single ADC pin using resistor ladder. |
| typedef ScrollButton< BinarizeEqDecor< DebounceDecor< DigitalPinReader< tPin, tPinMode > >, tActivatesOn > > | PinScrollButton Digital pin key-button with debouncing and level normalization. |
| typedef Slider< AnalogPinReader< tPin, tPinMode >, tMinPos, tMaxPos > | PinSlider Pin-based slider mapping analog readings to 0-255 range. |
| typedef Switch< BinarizeEqDecor< DebounceDecor< DigitalPinReader< tPin, tPinMode > >, ACTIVE_LEVEL > > | PinSwitch Digital pin switch with debouncing and level normalization. |
| typedef Joystick< AnalogPinReader< tPin, tPinMode >, tMinPos,(tMaxPos+tMinPos)/2, tMaxPos > | PinSymmetricJoystick Pin-based joystick with symmetric range (tMinPos to tMaxPos, center at midpoint). |
| typedef Button< BinarizeEqDecor< DebounceDecor< DigitalPinReader< tPin, INPUT_PULLUP > >, LOW > > | PullUpButton Pull-up button (active LOW, connect to GND). |
| typedef ScrollButton< BinarizeEqDecor< DebounceDecor< DigitalPinReader< tPin, INPUT_PULLUP > >, LOW > > | PullUpScrollButton Pull-up key-button (active LOW, connect to GND). |
| typedef PinSwitch< tPin, 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) Checks if value x is between a and b (inclusive). |
Public Types Documentation¶
typedef PinButton¶
Digital pin button with debouncing and level normalization.
using eva::PinButton = Button<BinarizeEqDecor<DebounceDecor<DigitalPinReader<tPin, tPinMode>>, tActivatesOn>>;
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:
tPinArduino pin numbertPinModePin mode (INPUT, INPUT_PULLUP, etc.)tActivatesOnLevel that means "pressed" (LOW or HIGH)
typedef PinJoystick¶
Pin-based joystick with custom center position.
using eva::PinJoystick = Joystick<AnalogPinReader<tPin, tPinMode>, tMinPos, tMiddlePos, tMaxPos>;
Template parameters:
tPinArduino pin numbertPinModePin mode (usually INPUT)tMinPosMinimum analog readingtMiddlePosCenter position readingtMaxPosMaximum analog reading
typedef PinMultiButton¶
Multiple buttons on a single ADC pin using resistor ladder.
using eva::PinMultiButton = Button<QuantizeDecor<DebounceDecor<AnalogPinReader<tPin, tPinMode>>, tLevels...>>;
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:
tPinArduino analog pin numbertPinModePin mode (usually INPUT)tLevelsThreshold values for each button (expected ADC readings)
See also: PinMultiSwitch For use cases without click detection
typedef PinMultiScrollButton¶
Multiple key-buttons on a single ADC pin using resistor ladder.
using eva::PinMultiScrollButton = ScrollButton<QuantizeDecor<DebounceDecor<AnalogPinReader<tPin, tPinMode>>, tLevels...>>;
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:
tPinArduino analog pin numbertPinModePin mode (usually INPUT)tLevelsThreshold 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<tPin, tPinMode>>, tLevels...>>;
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:
tPinArduino analog pin numbertPinModePin mode (usually INPUT)tLevelsThreshold values for each switch (expected ADC readings)
typedef PinScrollButton¶
Digital pin key-button with debouncing and level normalization.
using eva::PinScrollButton = ScrollButton<BinarizeEqDecor<DebounceDecor<DigitalPinReader<tPin, tPinMode>>, tActivatesOn>>;
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:
tPinArduino pin numbertPinModePin mode (INPUT, INPUT_PULLUP, etc.)tActivatesOnLevel that means "pressed" (LOW or HIGH)
typedef PinSlider¶
Pin-based slider mapping analog readings to 0-255 range.
using eva::PinSlider = Slider<AnalogPinReader<tPin, tPinMode>, tMinPos, tMaxPos>;
Template parameters:
tPinArduino pin numbertPinModePin mode (usually INPUT)tMinPosMinimum analog readingtMaxPosMaximum analog reading
typedef PinSwitch¶
Digital pin switch with debouncing and level normalization.
using eva::PinSwitch = Switch<BinarizeEqDecor<DebounceDecor<DigitalPinReader<tPin, tPinMode>>, 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:
tPinArduino pin numbertPinModePin mode (INPUT, INPUT_PULLUP, etc.)ACTIVE_LEVELLevel that means active (LOW or HIGH)
typedef PinSymmetricJoystick¶
Pin-based joystick with symmetric range (tMinPos to tMaxPos, center at midpoint).
using eva::PinSymmetricJoystick = Joystick<AnalogPinReader<tPin, tPinMode>, tMinPos, (tMaxPos + tMinPos) / 2, tMaxPos>;
Template parameters:
tPinArduino pin numbertPinModePin mode (usually INPUT)tMinPosMinimum analog readingtMaxPosMaximum analog reading
typedef PullUpButton¶
Pull-up button (active LOW, connect to GND).
using eva::PullUpButton = Button<BinarizeEqDecor<DebounceDecor<DigitalPinReader<tPin, 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:
tPinArduino pin number
typedef PullUpScrollButton¶
Pull-up key-button (active LOW, connect to GND).
using eva::PullUpScrollButton = ScrollButton<BinarizeEqDecor<DebounceDecor<DigitalPinReader<tPin, 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:
tPinArduino pin number
typedef PullUpSwitch¶
Pull-up switch (active LOW, connect to GND).
using eva::PullUpSwitch = PinSwitch<tPin, 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:
tPinArduino 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¶
Checks if value x is between a and b (inclusive).
static inline bool eva::in_between (
signed short x,
signed short a,
signed short b
)
Parameters:
xValue to checkaLower boundbUpper bound
Returns:
true if x is between a and b inclusive
The documentation for this class was generated from the following file src/evaBlinkingIndicator.h