Added ESP8266HTTPUpdateServer, better than Arduino OTA

This commit is contained in:
Deb 2018-03-15 22:15:59 -04:00 committed by GitHub
parent 39d5b5ba42
commit ca79367153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,10 @@
ESP8266WebServer server(80);
WebSocketsServer webSocket = WebSocketsServer(81);
#ifdef HTTP_OTA
#include <ESP8266HTTPUpdateServer.h>
ESP8266HTTPUpdateServer httpUpdater;
#endif
// ***************************************************************************
// Load libraries / Instanciate WS2812FX library
@ -569,6 +573,10 @@ void setup() {
getStatusJSON();
});
#ifdef HTTP_OTA
httpUpdater.setup(&server,"/update");
#endif
server.begin();
// Start MDNS service