Compare commits
1 Commits
9668c246f9
...
cda493de2c
| Author | SHA1 | Date | |
|---|---|---|---|
|
cda493de2c
|
@ -31,7 +31,6 @@ typedef struct {uint8_t start; uint16_t len;} word_t;
|
||||
#define ZWOLF ((word_t) {.start= 94, .len=5})
|
||||
#define ZEHN_UHR ((word_t) {.start= 99, .len=4})
|
||||
#define NEUN ((word_t) {.start=102, .len=4})
|
||||
//#define UHR ((word_t) {.start=107, .len=3})
|
||||
#define UHR ((word_t) {.start=107, .len=3})
|
||||
|
||||
word_t HOURS[] = {
|
||||
@ -49,6 +48,8 @@ CRGB leds[ROWS*COLS];
|
||||
void set(word_t word) {
|
||||
CRGB color = CRGB(255,255,255);
|
||||
int dir = 1;
|
||||
// because of the snaking LED layout, we need to reverse every second row
|
||||
// i.e. flip the start on the other side and then count backwards
|
||||
if (word.start % 22 >= 11) {
|
||||
word.start = (word.start/11)*11 + 10 - (word.start % 11);
|
||||
dir = -1;
|
||||
@ -111,6 +112,7 @@ void setup() {
|
||||
|
||||
void loop() {
|
||||
|
||||
// TODO: Get actual time from somewhere
|
||||
time_t ts = 1616970481; // UTC
|
||||
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user