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 <Arduino.h>
|
||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
|
#include <ArduinoOTA.h>
|
||||||
#include "my_fastled.h"
|
#include "my_fastled.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
@ -109,6 +110,8 @@ void setup() {
|
|||||||
|
|
||||||
wifi_setup();
|
wifi_setup();
|
||||||
mqtt_setup();
|
mqtt_setup();
|
||||||
|
ArduinoOTA.setHostname(OTA_HOSTNAME);
|
||||||
|
ArduinoOTA.begin();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -129,6 +132,8 @@ void loop() {
|
|||||||
#else
|
#else
|
||||||
// Normal mode
|
// Normal mode
|
||||||
mqtt_loop();
|
mqtt_loop();
|
||||||
|
ArduinoOTA.handle();
|
||||||
|
|
||||||
EVERY_N_MILLISECONDS(20 / SPEEDUP) {
|
EVERY_N_MILLISECONDS(20 / SPEEDUP) {
|
||||||
looping = false;
|
looping = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user