infinityledclock/vscode/LEDClock/include/clockelements.hpp

26 lines
783 B
C++
Raw Normal View History

2020-02-17 10:18:53 +01:00
#include <Arduino.h>
#include "Adafruit_NeoPixel.h"
class elements
{
private:
/* data */
#define BRIGHTNESS 128
#define SATURATION 255
public:
unsigned int elements_fraction, element_first_pixel, element_last_pixel, element_number_pixels;
uint8_t elements_saturation, elements_brightness;
bool element_outside2inside = false;
Adafruit_NeoPixel *element_pixels;
void init(Adafruit_NeoPixel *pixels, unsigned int first_led, unsigned int number_leds, bool outside2inside);
void fill(uint16_t huecolor, uint8_t saturation = SATURATION, uint8_t brightness = BRIGHTNESS);
void clean(void);
void ffill(uint16_t huecolor, unsigned int fraction, uint8_t saturation = SATURATION, uint8_t brightness = BRIGHTNESS);
};