WordClockESP/src/Clock.h

34 lines
598 B
C
Raw Normal View History

2021-03-06 22:06:09 +01:00
//
// Created by lukas on 06.03.21.
//
#ifndef LEDSTRIPINTERFACE_CLOCK_H
#define LEDSTRIPINTERFACE_CLOCK_H
#include <Ticker.h>
#include "Adafruit_NeoPixel.h"
#include "Arduino.h"
#include "LoadAnimator.h"
2021-03-06 22:06:09 +01:00
#define NUMPIXELS 108 // Popular NeoPixel ring size
class Clock {
private:
Adafruit_NeoPixel strip{};
LoadAnimator animator;
2021-03-06 22:06:09 +01:00
void paintAllwaysOnLeds();
void printWord(std::vector<int> word, uint32_t color);
void setTime(uint8_t hour, uint8_t minute);
public:
Clock();
void init();
void refreshTime();
Ticker refreshTicker;
};
#endif // LEDSTRIPINTERFACE_CLOCK_H