Go to file
Scott Baker 8bd9a8cc14
Merge pull request #10 from jamesfowkes/fix-missing-millis-init
Initialize last value to millis()
2020-07-23 07:56:16 -07:00
examples Fix a delay call 2019-03-29 13:53:29 -07:00
src Initialize last value to millis() 2020-07-23 15:06:01 +01:00
.gitignore Ignore Makefiles and *.bin 2019-03-13 22:03:02 -07:00
library.properties Bump version to v0.1.5 2019-03-20 08:52:48 -07:00
LICENSE Initial commit 2019-03-13 20:43:02 -07:00
README.md Update the README to reflect the class based model 2019-03-19 12:25:57 -07:00

ESP WebOTA

Easily add web based OTA updates to your ESP32/ESP8266 projects.

Installation

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

Usage

Include the WebOTA library

#include <WebOTA.h>

Optionally initialize the WebOTA library if you want to change the defaults. This is done at the end of your setup() function:

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

    // To use a specific port and path uncomment this line
    // Defaults are 8080 and "/webota"
    // webota.init(8888, "/update");
}

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

void loop() {
    // Other loop code here

    webota.handle();
}

Note: If you have long delay() commands in your loop() WebOTA may not be responsive. We have provided webota.delay() as a drop-in replacement, which is more WebOTA friendly.

Upload a sketch

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.

Navigate to your ESP in a web browser to upload your binary image. Typical URLs are: http://esp-ota.local:8080/webota.

You can also use Curl if you want to script your uploads from the CLI

curl -F "file=@MyImage.bin" http://esp-ota.local:8080/webota

Based on

Borrowed from randomnerdtutorials.com and improved upon.