Skip to content

Class eva::BlinkingIndicator

ClassList > eva > BlinkingIndicator

Indicator that blinks with specified period and duty cycle.More...

  • #include <evaBlinkingIndicator.h>

Inherits the following classes: eva::Indicator, eva::IHandler

Inherited by the following classes: eva::CountdownIndicator

Public Functions

Type Name
Indicator (unsigned pin, int activationLevel=HIGH)
Constructor.
void off ()
Turns off the indicator.
void on ()
Turns on the indicator continuously.
void on (unsigned short period, unsigned char dutycyclePercent)
Turns on the indicator with blinking pattern.

Public Functions inherited from eva::Indicator

See eva::Indicator

Type Name
Indicator (unsigned pin, int activationLevel=HIGH)
Constructor.
void off ()
Turns the indicator off.
void on ()
Turns the indicator on.

Public Functions inherited from eva::IHandler

See eva::IHandler

Type Name
virtual void invoke (void * msgSender, CallbackInfo cbInfo) = 0

Protected Attributes

Type Name
unsigned char dutycyclePercent
DelayTimer dutycycleTimer
DelayTimer heartbeatTimer
unsigned short period

Protected Functions

Type Name
void startCycle ()

Detailed Description

Note: This class serves as a demonstration of library concepts and is intentionally kept simple for clarity. Performance optimization was not the primary focus. It is recommended for prototyping stages to validate your application logic. For production use with strict timing requirements, consider implementing a custom solution based on your specific needs.

Public Functions Documentation

function Indicator

Constructor.

eva::BlinkingIndicator::Indicator (
    unsigned pin,
    int activationLevel=HIGH
) 

Parameters:

  • pin Arduino pin number
  • activationLevel Level that turns indicator on (LOW, HIGH, or PWM value)

function off

Turns off the indicator.

void eva::BlinkingIndicator::off () 

function on [1/2]

Turns on the indicator continuously.

void eva::BlinkingIndicator::on () 

function on [2/2]

Turns on the indicator with blinking pattern.

void eva::BlinkingIndicator::on (
    unsigned short period,
    unsigned char dutycyclePercent
) 

Parameters:

  • period Blinking period in milliseconds
  • dutycyclePercent On-time percentage (0-100)

Protected Attributes Documentation

variable dutycyclePercent

unsigned char eva::BlinkingIndicator::dutycyclePercent;

variable dutycycleTimer

DelayTimer eva::BlinkingIndicator::dutycycleTimer;

variable heartbeatTimer

DelayTimer eva::BlinkingIndicator::heartbeatTimer;

variable period

unsigned short eva::BlinkingIndicator::period;

Protected Functions Documentation

function startCycle

void eva::BlinkingIndicator::startCycle () 


The documentation for this class was generated from the following file src/evaBlinkingIndicator.h