Go to file
2019-03-14 14:53:05 -07:00
examples Lower the delay so our OTA updates are more reliable 2019-03-14 09:15:33 -07:00
src Print out the upload status via serial 2019-03-14 14:53:05 -07:00
.gitignore Ignore Makefiles and *.bin 2019-03-13 22:03:02 -07:00
library.properties Initial checkin of code 2019-03-13 21:25:26 -07:00
LICENSE Initial commit 2019-03-13 20:43:02 -07:00
README.md README clarifications 2019-03-14 08:59:32 -07:00

ESP WebOTA

Easily add web based OTA updates to your ESP32 projects.

Installation

Clone this repo to your Arduino libraries directory. On Linux this is ~/Arduino/libraries/

Usage

Create a global variable for the Web Server:

#include <WebOTA.h>
WebServer OTAServer(8080);

Initialize the WebOTA library at the end of your setup() function:

void setup() {
    // Other init code here (WiFi, etc)

    init_web_ota(&OTAServer);
}

Listen for update requests at the end of your loop() function:

void loop() {
    // Other loop code here

    OTAServer.handleClient();
}

Note: If you have long delay() commands in your loop() WebOTA may not be responsive.

Upload a sketch

Navigate to your ESP32 in a web browser, typical URLs are: http://esp32-ota.local:8080/webota. You will need to create a binary sketch image to upload. This is done in the Arduino IDE by going to the Sketch menu and selecting Export compiled Binary.

Based on

Borrowed from randomnerdtutorials.com and improved upon.