34 lines
571 B
C++
34 lines
571 B
C++
/*
|
|
* ESP8266 RGBW controller
|
|
* Copyright 2020 (c) Mark van Renswoude
|
|
*
|
|
* https://git.x2software.net/pub/RGBWifi
|
|
*/
|
|
#ifndef __Strip
|
|
#define __Strip
|
|
|
|
#include <NeoPixelBus.h>
|
|
#include "./config.h"
|
|
|
|
|
|
class Strip
|
|
{
|
|
private:
|
|
NeoPixelBus<NeoPixelBusFeature, NeoPixelBusMethod>* mBus;
|
|
void(Strip::*tickMethod)() = nullptr;
|
|
uint32_t lastTick;
|
|
|
|
uint32_t delay;
|
|
|
|
void update();
|
|
|
|
void tickRainbow();
|
|
public:
|
|
void init(uint16_t ledCount);
|
|
void tick();
|
|
|
|
void setStatic(const RgbwColor color);
|
|
void setRainbow(uint16_t speed);
|
|
};
|
|
|
|
#endif |