From 0d88dc3e0f66f9f4437c66bf6b93eeb2d8f0161c Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Fri, 8 Jan 2021 17:10:36 +0100 Subject: [PATCH] Added ArduinoOTA to allow updating over-the-air. --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index d88b60e..dc8e5ce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include #include +#include #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;