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

a traffic light with 3 PCF8547 pin More...

#include <Noiasca_PCF8574.h>

Inheritance diagram for TrafficlightPCF8547:
Trafficlight< PCF8574_IFGroup< 3 > >

Public Member Functions

 TrafficlightPCF8547 (PCF8574expander &hardware, uint8_t pinA, uint8_t pinB, uint8_t pinC)
 
- Public Member Functions inherited from Trafficlight< PCF8574_IFGroup< 3 > >
 Trafficlight (PCF8574_IFGroup< 3 > &obj)
 constructor for a traffic light More...
 
void begin ()
 start hardware More...
 
void setInterval (uint16_t _on)
 set on times More...
 
int setSequenceIndex (uint8_t index, uint8_t newState, uint16_t newInterval)
 set the sequence parameters More...
 
int setSequenceMax (uint8_t newMax)
 set the number of sequences More...
 
void setMode (Mode newMode)
 set the current Mode of the traffic light More...
 
void setOnStateChange (Callback funcPtr)
 set the callback function onStateChange More...
 
void setOnSequenceChange (Callback funcPtr)
 set the callback function onSequnceChange More...
 
void setOnColor (uint16_t actual, uint32_t _on)
 set the color for a traffic light More...
 
void setOffColor (uint32_t _off)
 set the color for a traffic light More...
 
void setState (uint8_t newState)
 set the state of the traffic light More...
 
void update (uint32_t currentMillis=millis())
 check if update is necessary More...
 

Detailed Description

a traffic light with 3 PCF8547 pin

wrapper for a traffic light with 3 PCF8547 pin. Inherits "style" class and composites PCF8547 pin.

Constructor & Destructor Documentation

◆ TrafficlightPCF8547()

TrafficlightPCF8547::TrafficlightPCF8547 ( PCF8574expander hardware,
uint8_t  pinA,
uint8_t  pinB,
uint8_t  pinC 
)
inline
Parameters
hardwarea reference to your PCF8574 object
pinAthe pin on the expander to be used for red
pinBthe pin on the expander to be used for yellow
pinCthe pin on the expander to be used for green