Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
Public Member Functions | List of all members
BeatPin Class Reference

heartbeat - dims up and down permanentely More...

#include <Noiasca_LED.h>

Inheritance diagram for BeatPin:
GenericPin BasePin< 1 >

Public Member Functions

 BeatPin (byte pin, bool active=HIGH)
 heartbeat LED More...
 
void setMaxBrightness (byte maxBrightness)
 set the maximum brightness More...
 
void setMinBrightness (byte minBrightness)
 set the minium brightness More...
 
void on () override
 switch output on More...
 
void off () override
 switch output off More...
 
void update ()
 run More...
 
- Public Member Functions inherited from GenericPin
 GenericPin (byte pinA, bool active=HIGH)
 generic output More...
 
void begin ()
 set the pin to the proper state More...
 
void off () override
 switch output off More...
 
void on () override
 switch output on More...
 
- Public Member Functions inherited from BasePin< 1 >
virtual void on ()
 switch output on More...
 
virtual void off ()
 switch output off More...
 
virtual void setState (byte newState)
 set state of output to specific state More...
 
void toggle ()
 switch between on or off state
 
virtual void update ()
 run More...
 

Detailed Description

heartbeat - dims up and down permanentely

The output will dimm up and down. You can define threashold for min and max dim level.

Note
to get a nice effect use PWM pins only
Todo:

rework to enabe

make active working

Constructor & Destructor Documentation

◆ BeatPin()

BeatPin::BeatPin ( byte  pin,
bool  active = HIGH 
)
inline

heartbeat LED

Parameters
pina PWM pin to connect a LED
activedefault HIGH means active HIGH (connect the other LED pin to GND) - not implmented yet.
Note
to get a nice effect use PWM pins only

Member Function Documentation

◆ setMaxBrightness()

void BeatPin::setMaxBrightness ( byte  maxBrightness)
inline

set the maximum brightness

The output will dimm up to this maximum level.

Parameters
maxBrightnessthe maximum brigthness (upper end of range) [0..255]

◆ setMinBrightness()

void BeatPin::setMinBrightness ( byte  minBrightness)
inline

set the minium brightness

The output will dimm down to this maximum level.

Parameters
minBrightnessthe minium brigthness (lower end of range) [0..255]

◆ on()

void BeatPin::on ( )
inlineoverridevirtual

switch output on

Switch the output to on state.

Reimplemented from GenericPin.

◆ off()

void BeatPin::off ( )
inlineoverridevirtual

switch output off

Switch the output to off state.

Reimplemented from GenericPin.

◆ update()

void BeatPin::update ( )
inlinevirtual

run

call this member function in your loop()

Reimplemented from BasePin< 1 >.