We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bf6a0d commit 6e8a81bCopy full SHA for 6e8a81b
examples/ControlAssist-ToggleLed/ControlAssist-ToggleLed.ino
@@ -206,15 +206,21 @@ void setup() {
206
207
208
void loop() {
209
+ #if not defined(ESP32)
210
+ if(MDNS.isRunning()) MDNS.update(); //Handle MDNS
211
+ #endif
212
+ //Handler webserver clients
213
+ server.handleClient();
214
+ //Handle websockets
215
+ ctrl.loop();
216
+
217
if (millis() - pingMillis >= 5000){
218
ledState = !ledState;
219
toggleLed(ledState);
220
//Set the ledState and send a websocket update
221
ctrl.put("toggleLed", ledState );
222
pingMillis = millis();
- }
- ctrl.loop();
- server.handleClient();
223
+ }
224
}
225
226
0 commit comments