delay() keeps WiFi running

If you have a loop somewhere in your sketch that takes a lot of time (>50ms)
without calling delay, you might consider adding a call to delay function to
keep the WiFi stack running smoothly.

Source: https://web.archive.org/web/20240620105303/https://arduino-esp8266.readthedocs.io/en/3.0.0/reference.html#timing-and-delays
This commit is contained in:
x 2024-06-20 12:50:20 +02:00
parent 6b8535d211
commit 5d0eb0694b

View file

@ -55,5 +55,5 @@ void ensureWiFiConnection() {
void loop() { void loop() {
ensureWiFiConnection(); ensureWiFiConnection();
testInternet(); testInternet();
delay(5000); // TODO: cleaner interval between tests delay(5000);
} }