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"
|
2021-03-06 23:42:48 +01:00
|
|
|
#include "LoadAnimator.h"
|
2021-03-06 22:06:09 +01:00
|
|
|
|
|
|
|
#define NUMPIXELS 108 // Popular NeoPixel ring size
|
|
|
|
|
|
|
|
class Clock {
|
|
|
|
private:
|
|
|
|
Adafruit_NeoPixel strip{};
|
2021-03-06 23:42:48 +01:00
|
|
|
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
|