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

base output class More...

#include <Noiasca_LED.h>

Public Member Functions

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

template<size_t noOfPins>
class BasePin< noOfPins >

base output class

we start with a generic base class this class holds general member functions (methods) which are used in all classes on/off/toogle, some methods can be overridden in the derived class therefore we need a late binding and declare them virtual this class doesn't have any HW interface

Member Function Documentation

◆ on()

template<size_t noOfPins>
virtual void BasePin< noOfPins >::on ( )
inlinevirtual

switch output on

Switch the output to on state.

Reimplemented in GenericPin, BeatPin, FluorescentPin, and PulsePin.

◆ off()

template<size_t noOfPins>
virtual void BasePin< noOfPins >::off ( )
inlinevirtual

switch output off

Switch the output to off state.

Reimplemented in Turnsignal< T >, GenericPin, AlternatingPin, BeatPin, FluorescentPin, Trafficlight, and Turnsignal< T >.

◆ setState()

template<size_t noOfPins>
virtual void BasePin< noOfPins >::setState ( byte  newState)
inlinevirtual

set state of output to specific state

Parameters
newStatethe new state for this output

Reimplemented in Turnsignal< T >, Trafficlight, and Turnsignal< T >.

◆ update()

template<size_t noOfPins>
virtual void BasePin< noOfPins >::update ( )
inlinevirtual

run

call this member function in your loop()

Reimplemented in AlternatingPin, BlinkPin, BeatPin, Bounce5Pin, FlickerPin, FluorescentPin, PulsePin, RhythmPin, SmoothPin, Trafficlight, Turnsignal< T >, and Turnsignal< T >.