8 #ifndef COMPONENTS_SMARTLED_H_
9 #define COMPONENTS_SMARTLED_H_
36 virtual void init() = 0;
37 virtual void show() = 0;
40 void setPixel(uint16_t index, uint8_t red, uint8_t green, uint8_t blue);
42 void setPixel(uint16_t index, uint32_t pixel);
43 void setPixelCount(uint16_t pixelCount);
44 void setHSBPixel(uint16_t index, uint16_t hue, uint8_t saturation, uint8_t brightness);
48 uint32_t m_brightness;
50 uint16_t m_pixelCount;
uint32_t getBrightness()
Get the brightness as a percentage.
Definition: SmartLED.cpp:47
void setHSBPixel(uint16_t index, uint16_t hue, uint8_t saturation, uint8_t brightness)
Set the given pixel to the specified HSB color.
Definition: SmartLED.cpp:158
A data type representing the color of a pixel.
Definition: SmartLED.h:14
void setColorOrder(char *order)
Set the color order of data sent to the LEDs.
Definition: SmartLED.cpp:82
uint8_t red
The red component of the pixel.
Definition: SmartLED.h:18
uint16_t getPixelCount()
Return the number of pixels in the chain.
Definition: SmartLED.cpp:56
uint8_t blue
The blue component of the pixel.
Definition: SmartLED.h:26
void clear()
Clear all the pixel colors.
Definition: SmartLED.cpp:34
void setPixel(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)
Set the given pixel to the specified color.
Definition: SmartLED.cpp:99
void setBrightness(uint32_t percent)
Set the brightness as a percentage.
Definition: SmartLED.cpp:65
Definition: SmartLED.h:30
uint8_t green
The green component of the pixel.
Definition: SmartLED.h:22