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

a plain on/off pin More...

#include <Noiasca_LED.h>

Inheritance diagram for GenericPin:
BasePin< 1 > BeatPin BlinkPin FlickerPin FluorescentPin PulsePin RhythmPin SmoothPin

Public Member Functions

 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

a plain on/off pin

This shows only the basic hardware part of a generic pin class

state 0 OFF, 1 ON

Constructor & Destructor Documentation

◆ GenericPin()

GenericPin::GenericPin ( byte  pinA,
bool  active = HIGH 
)
inline

generic output

Parameters
pinAa pin to connect a LED or a relais
activedefault HIGH means active HIGH (connect the other LED pin to GND).

Member Function Documentation

◆ begin()

void GenericPin::begin ( )
inline

set the pin to the proper state

call this function in your setup()

◆ off()

void GenericPin::off ( )
inlineoverridevirtual

switch output off

Switch the output to off state.

Reimplemented from BasePin< 1 >.

Reimplemented in BeatPin, and FluorescentPin.

◆ on()

void GenericPin::on ( )
inlineoverridevirtual

switch output on

Switch the output to on state.

Reimplemented from BasePin< 1 >.

Reimplemented in BeatPin, FluorescentPin, and PulsePin.