This commit is contained in:
Gabriel Augendre 2023-01-04 16:18:21 +01:00
parent 47267d9217
commit 0b34828376
3 changed files with 14 additions and 3 deletions

View file

@ -1,11 +1,19 @@
# Buzzer # Buzzer
## Build ## Build
```shell ```shell
platformio run --target uploadfs pio run -t uploadfs
platformio run --target upload pio run -t upload
``` ```
## Monitor ## Monitor
```shell ```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.

View file

@ -21,3 +21,4 @@ lib_deps =
https://github.com/schreibfaul1/ESP32-audioI2S.git https://github.com/schreibfaul1/ESP32-audioI2S.git
adafruit/Adafruit SSD1306 adafruit/Adafruit SSD1306
adafruit/Adafruit GFX Library adafruit/Adafruit GFX Library
ayushsharma82/AsyncElegantOTA

View file

@ -8,6 +8,7 @@
#include <Adafruit_GFX.h> #include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h> #include <Adafruit_SSD1306.h>
#include <Preferences.h> #include <Preferences.h>
#include <AsyncElegantOTA.h>
// Toggle on to switch to AP mode. // Toggle on to switch to AP mode.
// Leave commented for wifi station mode. // Leave commented for wifi station mode.
@ -341,6 +342,7 @@ void setup()
server.on("/upload", HTTP_POST, onUpload, onUploadFile); server.on("/upload", HTTP_POST, onUpload, onUploadFile);
server.onNotFound(onNotFound); server.onNotFound(onNotFound);
server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("index.html"); server.serveStatic("/", SPIFFS, "/www/").setDefaultFile("index.html");
AsyncElegantOTA.begin(&server);
server.begin(); server.begin();
Serial.println("Server ready!"); Serial.println("Server ready!");