RSeries astromech firmware
FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS > Class Template Reference

#include <dome/FireStrip.h>

Detailed Description

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
class FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >

Animates electrical sparks and then fire.

Animates electrical sparks and then fire.

Example usage:

FireStrip fireStrip;
fireStrip.spark(500);
fireStrip.burn(500);
+ Inheritance diagram for FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >:
+ Collaboration diagram for FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >:

Public Member Functions

 FireStrip (const int id=0)
 
int getID ()
 
void spark (uint16_t duration)
 Spark animation for the specified millisecond duration. More...
 
void burn (uint16_t duration)
 Fire animation for the specified millisecond duration. More...
 
void off ()
 Turn of all LEDs. More...
 
virtual void setup () override
 Configures the NeoPixel ring and centers the holoprojector if servos have been assigned. More...
 
virtual void animate () override
 Runs through one frame of animation for this FireStrip instance. More...
 
virtual void handleCommand (const char *cmd) override
 FireStrip Commands start with 'FS'. More...
 
void dirty ()
 
- 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

◆ FireStrip()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::FireStrip ( const int  id = 0)
inline

Member Function Documentation

◆ animate()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
virtual void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::animate ( )
inlineoverridevirtual

Runs through one frame of animation for this FireStrip instance.

Implements AnimatedEvent.

◆ burn()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::burn ( uint16_t  duration)
inline

Fire animation for the specified millisecond duration.

◆ dirty()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::dirty ( )
inline

◆ getID()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
int FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::getID ( )
inline
Returns
FireStrip Jawa ID

◆ handleCommand()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
virtual void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::handleCommand ( const char *  cmd)
inlineoverridevirtual

FireStrip Commands start with 'FS'.

Implements CommandEvent.

◆ off()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::off ( )
inline

Turn of all LEDs.

◆ setup()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
virtual void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::setup ( )
inlineoverridevirtual

Configures the NeoPixel ring and centers the holoprojector if servos have been assigned.

Implements SetupEvent.

◆ spark()

template<uint8_t DATA_PIN, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 8>
void FireStrip< DATA_PIN, RGB_ORDER, NUM_LEDS >::spark ( uint16_t  duration)
inline

Spark animation for the specified millisecond duration.


The documentation for this class was generated from the following file:
FireStrip
Animates electrical sparks and then fire.
Definition: FireStrip.h:50
FireStrip::burn
void burn(uint16_t duration)
Fire animation for the specified millisecond duration.
Definition: FireStrip.h:100
FireStrip::spark
void spark(uint16_t duration)
Spark animation for the specified millisecond duration.
Definition: FireStrip.h:90