Compare commits

..

1 Commits

Author SHA1 Message Date
9668c246f9 Add arduino (led) version 2021-03-30 23:09:24 +02:00

View File

@ -31,6 +31,7 @@ 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[] = {
@ -48,8 +49,6 @@ 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;
@ -112,7 +111,6 @@ void setup() {
void loop() {
// TODO: Get actual time from somewhere
time_t ts = 1616970481; // UTC
while (1) {