RSeries astromech firmware
RelaySwitch Class Reference

#include <core/RelaySwitch.h>

Detailed Description

Controls a relay.

Control a relay with the ability to specify maximum pause times between activated as well as auto shut-off timer.

+ Inheritance diagram for RelaySwitch:
+ Collaboration diagram for RelaySwitch:

Public Member Functions

 RelaySwitch (byte relayPin, uint32_t pauseTime=0)
 Constructor. More...
 
void relayOn (uint32_t switchOffMS=0)
 Turn on the smoke machine. More...
 
void relayOff ()
 Turn off the smoke machine. More...
 
virtual void animate () override
 Check if smoke machine timer has expired. More...
 
- Public Member Functions inherited from AnimatedEvent
 AnimatedEvent ()
 Default Constructor. More...
 
void setLoopDoneCallback (AnimatedLoopDone loopProc)
 

Additional Inherited Members

- Static Public Member Functions inherited from AnimatedEvent
static void process ()
 Calls animate() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ RelaySwitch()

RelaySwitch::RelaySwitch ( byte  relayPin,
uint32_t  pauseTime = 0 
)
inline

Constructor.

Member Function Documentation

◆ animate()

virtual void RelaySwitch::animate ( )
inlineoverridevirtual

Check if smoke machine timer has expired.

Implements AnimatedEvent.

◆ relayOff()

void RelaySwitch::relayOff ( )
inline

Turn off the smoke machine.

◆ relayOn()

void RelaySwitch::relayOn ( uint32_t  switchOffMS = 0)
inline

Turn on the smoke machine.

A minimum of 5 minutes have to pass in between activations and the smoke will be automatically stopped after 6.5 seconds.


The documentation for this class was generated from the following file: