#include #include #include #include #include "my_fastled.h" /*void updateCallback(NTPClient* c) { random16_add_entropy(c->getEpochMillis() & 0xFFFF); LOGln("Received current time. Epoch is %lu.", ntpClient.getEpochTime()); }*/ void time_changed() { random16_add_entropy(millis() & 0xFFFF); time_t now; tm timeinfo; time(&now); localtime_r(&now, &timeinfo); char time_s[30]; strftime(time_s, 30, "%a %d.%m.%Y %T", &timeinfo); LOGln("NTP * Received time: %s", time_s); } void ntp_setup() { settimeofday_cb(time_changed); configTime(TZ_Europe_Berlin, "de.pool.ntp.org"); }