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

#include <dome/HoloDisplay.h>

Detailed Description

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
class HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >

Holo Projector with Adafruit SSD1131 OLED display.

Subclass of HoloLights adding support for an Adafruit SSD1131 OLED display.

Example usage:

HoloLights frontHolo;
+ Inheritance diagram for HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >:
+ Collaboration diagram for HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >:

Public Member Functions

 HoloDisplay (const int id=0)
 Constructor. More...
 
virtual void setup () override
 Initalizes the OLED display and SD card. More...
 
void setDownloadStream (Stream *stream)
 Enables support for downloading additional media onto the SD card through the specified Serial instance. More...
 
virtual void selectSequence (int sequence, int durationSec) override
 Specify the sequence to animate. More...
 
virtual void handleCommand (const char *cmd) override
 See HoloLights::handleCommand() More...
 
void clearDisplay ()
 Clear OLED screen to black. More...
 
void stop ()
 Stop playing the current movie. More...
 
void play (const char *filename)
 Play the specified movie file on the OLD display. More...
 
virtual void animate ()
 Runs through one frame of animation for this holoprojector display instance. More...
 
- Public Member Functions inherited from HoloLights< 45, GRB, 12 >
 HoloLights (const int id=0)
 Constructor. More...
 
void begin ()
 
void show ()
 
void setBrightness (uint8_t b)
 
uint8_t getBrightness ()
 
uint16_t numPixels ()
 
void setPixelColor (uint16_t n, uint32_t c)
 
virtual void jawaCommand (char cmd, int arg, int value) override
 Subclasses should override this method to handle commands specifying a value. More...
 
void assignServos (ServoDispatch *dispatcher, byte hServo, byte vServo)
 Assign ServoDispatcher and servos for horizontal and vertical movement. More...
 
int getID ()
 
void brighter ()
 Increase the brightness of the holoprojector. More...
 
void dimmer ()
 Decrease the brightness of the holoprojector. More...
 
void off ()
 Turn of all LEDs. More...
 
void setColor (int c)
 Set projector to a solid color. More...
 
void resetLEDTwitch ()
 
void resetHPTwitch ()
 
void setHoloPosition (float hpos, float vpos, int speed=0)
 
void moveHP (byte pos, int speed=0)
 Move holoprojector to the specified position. More...
 
void twitchHP (byte randtwitch)
 
void wagHP (byte type)
 
void setLEDTwitchInterval (unsigned minSeconds, unsigned maxSeconds)
 
void setLEDTwitchRunInterval (unsigned minSeconds, unsigned maxSeconds)
 
void setHPTwitchInterval (unsigned minSeconds, unsigned maxSeconds)
 
void dirty ()
 
- Public Member Functions inherited from HoloLEDPCB< DATA_PIN, RGB_ORDER, NUM_LEDS >
 HoloLEDPCB ()
 

Additional Inherited Members

- Public Types inherited from HoloLights< 45, GRB, 12 >
enum  HoloID
 
enum  HoloPosition
 
enum  HoloColors
 

Constructor & Destructor Documentation

◆ HoloDisplay()

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

Constructor.

Member Function Documentation

◆ animate()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
virtual void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::animate ( )
inlinevirtual

Runs through one frame of animation for this holoprojector display instance.

Reimplemented from HoloLights< 45, GRB, 12 >.

◆ clearDisplay()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::clearDisplay ( )
inline

Clear OLED screen to black.

◆ handleCommand()

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

◆ play()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::play ( const char *  filename)
inline

Play the specified movie file on the OLD display.

◆ selectSequence()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
virtual void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::selectSequence ( int  sequence,
int  durationSec 
)
inlineoverridevirtual

Specify the sequence to animate.

Reimplemented from HoloLights< 45, GRB, 12 >.

◆ setDownloadStream()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::setDownloadStream ( Stream *  stream)
inline

Enables support for downloading additional media onto the SD card through the specified Serial instance.

◆ setup()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
virtual void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::setup ( )
inlineoverridevirtual

Initalizes the OLED display and SD card.

Reimplemented from HoloLights< 45, GRB, 12 >.

◆ stop()

template<uint8_t DATA_PIN = 45, uint32_t RGB_ORDER = GRB, uint16_t NUM_LEDS = 12>
void HoloDisplay< DATA_PIN, RGB_ORDER, NUM_LEDS >::stop ( )
inline

Stop playing the current movie.


The documentation for this class was generated from the following file:
HoloLights
Controls the movement and display functions of a single Holoprojector.
Definition: HoloLights.h:57