This sketch shows a Basic example from the AsyncElegantOTA library: ESP8266_Async_DemoĬonst char* ssid = "REPLACE_WITH_YOUR_SSID" Ĭonst char* password = "REPLACE_WITH_YOUR_PASSWORD"
The root URL displays some text, and the /update URL displays the interface to update firmware and filesystem.Ĭopy the following code to your Arduino IDE. This example creates a simple web server with the ESP8266. Let’s start with the basic example provided by the library. zip Library and select the libraries you’ve just downloaded. Alternatively, in your Arduino IDE, you can go to Sketch > Include Library > Add.
These libraries aren’t available to install through the Arduino Library Manager, so you need to copy the library files to the Arduino Installation Libraries folder. Click the links below to download the libraries. You also need to install the ESPAsyncTCP and the ESPAsyncWebServer libraries. Install ESPAsyncWebServer and ESPAsyncTCP Libraries In your Arduino IDE, go to Sketch > Include Library > Manage Libraries… Search for “ AsyncElegantOTA” and install it. You can install the AsyncElegantOTA library using the Arduino Library Manager.
If you want to learn how to do the same using VS Code + PlatformIO, follow the next tutorial: ESP8266 NodeMCU OTA (Over-the-Air) Updates – AsyncElegantOTA (VS Code + PlatformIO). In this tutorial, the ESP8266 will be programmed using Arduino IDE. If you upload a code without an OTA routine, you’ll no longer be able to access the web server and upload a new sketch over-the-air.Then, you need to implement OTA routines in every sketch you upload so that you’re able to do the next updates/uploads over-the-air.The OTA Web Updater sketch creates a web server you can access to upload a new sketch via a web browser.This sketch should contain the code to create the OTA Web Updater so that you can upload code later using your browser.
The first sketch should be uploaded via the serial port.Open your browser and go to where is your ESP8266 IP address.Ĭontinue reading the tutorial for more detailed steps.Add this line AsyncElegantOTA.begin(&server) before server.begin().Include AsyncElegantOTA library at the top of the Arduino sketch: #include.Install AsyncElegantOTA, ESPAsyncTCP and ESPAsyncWebServer libraries.To add OTA capabilities to your projects using the AsyncElegantOTA library, follow these steps: OTA Updates with AsyncElegantOTA Library – Quick Summary If you like this library and you’ll use it in your projects, consider supporting the developer’s work. It provides a beautiful and modern web server interface.It allows you to update not only new firmware to the board but also files to the ESP8266 filesystem (LittleFS).You just need to add three lines of code to add OTA capabilities to your “regular” Async Web Server.It is compatible with the ESPAsyncWebServer library.We’ll show you later in the tutorial how to convert your files to. The AsyncElegantOTA library creates a web server that you can access on your local network to upload new firmware or files to the filesystem (LittleFS). In our opinion, this is one of the best and easiest ways to perform OTA updates. In this tutorial, we’ll cover how to do that using the AsyncElegantOTA library. There are different ways to perform OTA updates.
This functionality is extremely useful in case of no physical access to the ESP8266 board. OTA (Over-the-Air) update is the process of loading new firmware to the ESP8266 NodeMCU board using a Wi-Fi connection rather than serial communication. To demonstrate how to do this, we’ll upload files to build different web server projects. We recommend that you follow all the steps in this tutorial to understand how ElegantOTA works and how you can use it in your projects.