RSeries astromech firmware
|
#include <body/Zapper.h>
Controls a relay to a spark gap igniter to create some actual sparking.
Smoke will run for a maximum of 6.5 seconds with a minimum of 5 minute pause in between activations.
Public Member Functions | |
Zapper (byte idPin, byte relayPin) | |
Constructor. More... | |
bool | isAttached () |
void | zapperArm () |
Arm zapper. More... | |
void | zapperDisarm () |
Disarm zapper. More... | |
void | zapperOn () |
Turn on the zapper. More... | |
void | zapperOff () |
Turn off the smoke machine. More... | |
virtual void | handleCommand (const char *cmd) override |
Zapper Commands start with 'BZ'. More... | |
virtual void | animate () override |
Perform a single frame of zapper animation. More... | |
Public Member Functions inherited from CommandEvent | |
CommandEvent () | |
Default Constructor. More... | |
virtual void | handleCommand (String cmd) |
Subclasses should implement this function to process commands specific to their device. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from CommandEvent | |
static void | process (char *cmd) |
Calls handleCommand() for each created CommandEvent subclass. More... | |
static void | process (const char *cmd) |
Calls handleCommand() for each created CommandEvent subclass. More... | |
static void | process (PROGMEMString pcmd) |
Calls handleCommand() for each created CommandEvent subclass. More... | |
|
inline |
Constructor.
|
inlineoverridevirtual |
Perform a single frame of zapper animation.
Implements AnimatedEvent.
|
inlineoverridevirtual |
Zapper Commands start with 'BZ'.
Implements CommandEvent.
|
inline |
|
inline |
Arm zapper.
Extra step to make sure zapper is not fired while inside the body.
|
inline |
Disarm zapper.
Extra step to make sure zapper is not fired while inside the body.
|
inline |
Turn off the smoke machine.
|
inline |
Turn on the zapper.