22 lines
433 B
C++
22 lines
433 B
C++
#include "esp32_digital_led_lib.h"
|
|
|
|
|
|
class LedStrip
|
|
{
|
|
public:
|
|
LedStrip(int numLeds, int pin);
|
|
|
|
void begin();
|
|
|
|
void setColor(int led, int r, int g, int b, int w);
|
|
void transmit();
|
|
void clear();
|
|
void setAll(int r, int g, int b, int w);
|
|
void setRange(int begin, int end, int r, int g, int b, int w);
|
|
int numLeds() const { return numLeds_; }
|
|
private:
|
|
strand_t cfg;
|
|
strand_t *strands[1];
|
|
int numLeds_;
|
|
int pin_;
|
|
}; |