Added ArduinoOTA to allow updating over-the-air.
This commit is contained in:
parent
31157453cb
commit
0d88dc3e0f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user