Added ArduinoOTA to allow updating over-the-air.

This commit is contained in:
Fabian Schlenz 2021-01-08 17:10:36 +01:00
parent 31157453cb
commit 0d88dc3e0f

View File

@ -1,5 +1,6 @@
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ArduinoOTA.h>
#include "my_fastled.h"
#include "config.h"
#include "tools.h"
@ -109,6 +110,8 @@ void setup() {
wifi_setup();
mqtt_setup();
ArduinoOTA.setHostname(OTA_HOSTNAME);
ArduinoOTA.begin();
#endif
}
@ -129,6 +132,8 @@ void loop() {
#else
// Normal mode
mqtt_loop();
ArduinoOTA.handle();
EVERY_N_MILLISECONDS(20 / SPEEDUP) {
looping = false;