Added NTPClient and fixed that "random time delay" bug by applying pull request #62 https://github.com/arduino-libraries/NTPClient/pull/62. Also improved randomness by using the returned data from the NTP server to seed the RNG.
This commit is contained in:
@ -5,9 +5,9 @@
|
||||
|
||||
#define FASTLED_INTERNAL
|
||||
#include "FastLED.h"
|
||||
#include <NTPClient.h>
|
||||
#include <PubSubClient.h>
|
||||
#include "SimpleList.h"
|
||||
#include "ntp.h"
|
||||
|
||||
#include "config.h"
|
||||
CRGB leds[LED_COUNT];
|
||||
@ -98,7 +98,7 @@ void setup() {
|
||||
wifi_setup();
|
||||
ota_setup();
|
||||
fastled_setup();
|
||||
ntp_setup();
|
||||
ntpClient.begin();
|
||||
mqtt_setup();
|
||||
Serial.println("Core * Setup complete");
|
||||
}
|
||||
@ -128,7 +128,7 @@ void loop() {
|
||||
return;
|
||||
}
|
||||
|
||||
ntp_loop();
|
||||
ntpClient.update();
|
||||
mqtt_loop();
|
||||
|
||||
EVERY_N_MILLISECONDS(1000 / FPS) {
|
||||
|
Reference in New Issue
Block a user