mirror of
https://github.com/Crocmagnon/buzzer.git
synced 2024-12-24 23:11:52 +01:00
Add OTA
This commit is contained in:
parent
47267d9217
commit
0b34828376
3 changed files with 14 additions and 3 deletions
14
README.md
14
README.md
|
@ -1,11 +1,19 @@
|
|||
# Buzzer
|
||||
## Build
|
||||
```shell
|
||||
platformio run --target uploadfs
|
||||
platformio run --target upload
|
||||
pio run -t uploadfs
|
||||
pio run -t upload
|
||||
```
|
||||
|
||||
## Monitor
|
||||
```shell
|
||||
platformio device monitor
|
||||
pio device monitor
|
||||
```
|
||||
|
||||
## OTA
|
||||
```shell
|
||||
pio run
|
||||
pio run -t buildfs
|
||||
```
|
||||
|
||||
Go to http://<IP>/upload and upload `firmware.bin` and `spiffs.bin` to the firmware and filesystem sections.
|
||||
|
|
|
@ -21,3 +21,4 @@ lib_deps =
|
|||
https://github.com/schreibfaul1/ESP32-audioI2S.git
|
||||
adafruit/Adafruit SSD1306
|
||||
adafruit/Adafruit GFX Library
|
||||
ayushsharma82/AsyncElegantOTA
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
#include <Preferences.h>
|
||||
#include <AsyncElegantOTA.h>
|
||||
|
||||
// Toggle on to switch to AP mode.
|
||||
// Leave commented for wifi station mode.
|
||||
|
@ -341,6 +342,7 @@ void setup()
|
|||
server.on("/upload", HTTP_POST, onUpload, onUploadFile);
|
||||
server.onNotFound(onNotFound);
|
||||
server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("index.html");
|
||||
AsyncElegantOTA.begin(&server);
|
||||
server.begin();
|
||||
|
||||
Serial.println("Server ready!");
|
||||
|
|
Loading…
Reference in a new issue