RSeries astromech firmware
ButtonController Class Reference

#include <dome/ButtonController.h>

Detailed Description

Controller class for ia-parts.com Dome Button Controller.

Controller class for ia-parts.com Dome Button Controller. Allows you to control a relay or send i2c/serial/jawa/smq requests in response to button sequences.

Example sketch:

#include "ReelTwo.h"
#include "dome/TeecesPSI.h"
LedControlMAX7221<1> ledChain(6, 7, 8);
TeecesPSI frontSI(ledChain);
void setup()
{
REELTWO_READY();
SetupEvent::ready();
}
void loop()
{
AnimatedEvent::process();
}
+ Inheritance diagram for ButtonController:
+ Collaboration diagram for ButtonController:

Public Member Functions

 ButtonController (void(*flasher)(byte color, int rate)=NULL, const byte leftInputPin=2, const byte rightInputPin=3)
 
virtual void setup () override
 Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More...
 
virtual void animate () override
 Subclasses must implement this function to run through a single frame of animation/activity. More...
 
void setOutputPin (byte domePin, bool state)
 
- Public Member Functions inherited from SetupEvent
 SetupEvent ()
 Default Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SetupEvent
static void ready ()
 Calls setup() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ ButtonController()

ButtonController::ButtonController ( void(*)(byte color, int rate)  flasher = NULL,
const byte  leftInputPin = 2,
const byte  rightInputPin = 3 
)
inline

Member Function Documentation

◆ animate()

virtual void ButtonController::animate ( )
inlineoverridevirtual

Subclasses must implement this function to run through a single frame of animation/activity.

Subclasses should not call delay() or otherwise block.

Implements AnimatedEvent.

◆ setOutputPin()

void ButtonController::setOutputPin ( byte  domePin,
bool  state 
)
inline

◆ setup()

virtual void ButtonController::setup ( )
inlineoverridevirtual

Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.

Implements SetupEvent.


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