Using the ESP32 WebServer Book Section4.5 it uses the AsyncElegantOTA.h: library, but when compiling a warning comes up saying: #warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release. [-Wcpp]. Does this mean that it is not going to be used at a later date?
Hi.
You just need to remove the following line to the loop() and it will solve the issue.
AsyncElegantOTA.loop();
I’ll update the source code.
Regards,
Sara
HI, I removed the line and re-complied but it still comes up with a warning:
In file included from src\main.cpp:7:0:
.pio\libdeps\esp32doit-devkit-v1\AsyncElegantOTA\src/AsyncElegantOTA.h:4:2: warning: #warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release. [-Wcpp]
#warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release.
^
Thought I would send the complete Compile code just in case:
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
——————————————————————————————-Verbose mode can be enabled via `-v, –verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.htmlPLATFORM: Espressif 32 (3.4.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
– framework-arduinoespressif32 3.10006.210326 (1.0.6)
– tool-esptoolpy 1.30100.210531 (3.1.0)
– toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies…
Dependency Graph
|– <ESP Async WebServer> 1.2.3
| |– <AsyncTCP> 1.1.1
| |– <FS> 1.0
| |– <WiFi> 1.0
|– <Arduino_JSON> 0.1.0
|– <AsyncElegantOTA> 2.2.6
| |– <AsyncTCP> 1.1.1
| |– <ESP Async WebServer> 1.2.3
| | |– <AsyncTCP> 1.1.1
| | |– <FS> 1.0
| | |– <WiFi> 1.0
| |– <FS> 1.0
| |– <Update> 1.0
| |– <WiFi> 1.0
|– <SPIFFS> 1.0
| |– <FS> 1.0
|– <AsyncTCP> 1.1.1
|– <WiFi> 1.0
Building in release mode
Compiling .pio\build\esp32doit-devkit-v1\src\main.cpp.o
Generating partitions .pio\build\esp32doit-devkit-v1\partitions.bin
Compiling .pio\build\esp32doit-devkit-v1\lib719\AsyncTCP\AsyncTCP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib322\FS\FS.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib322\FS\vfs_api.cpp.o
In file included from src\main.cpp:7:0:
.pio\libdeps\esp32doit-devkit-v1\AsyncElegantOTA\src/AsyncElegantOTA.h:4:2: warning: #warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release. [-Wcpp]
#warning AsyncElegantOTA.loop(); is deprecated, please remove it from loop() if defined. This function will be removed in a future release.
^
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\ETH.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib322\libFS.a
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFi.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib719\libAsyncTCP.a
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiAP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiClient.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib54f\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\AsyncEventSource.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\SPIFFSEditor.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib54f\libWiFi.a
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\WebAuthentication.cpp.oCompiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\WebHandlers.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\WebRequest.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\WebResponses.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib052\ESP Async WebServer\WebServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib41b\Arduino_JSON\JSON.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib41b\Arduino_JSON\JSONVar.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib41b\Arduino_JSON\cjson\cJSON.c.o
Compiling .pio\build\esp32doit-devkit-v1\lib652\Update\HttpsOTAUpdate.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib652\Update\Updater.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib41b\libArduino_JSON.a
Compiling .pio\build\esp32doit-devkit-v1\lib004\SPIFFS\SPIFFS.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\libFrameworkArduinoVariant.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Esp.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib652\libUpdate.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\FunctionalInterrupt.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib004\libSPIFFS.a
Archiving .pio\build\esp32doit-devkit-v1\lib052\libESP Async WebServer.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-log.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-timer.c.o
C:\Users\Richard\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function ‘spiTransferBytesNL’:
C:\Users\Richard\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_out8 = &result[c_longs-1];
^
C:\Users\Richard\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_data8 = &last_data;
^
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
Retrieving maximum program size .pio\build\esp32doit-devkit-v1\firmware.elf
Checking size .pio\build\esp32doit-devkit-v1\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 13.3% (used 43644 bytes from 327680 bytes)
Flash: [======== ] 81.7% (used 1071106 bytes from 1310720 bytes)
Building .pio\build\esp32doit-devkit-v1\firmware.bin
esptool.py v3.1
Merged 1 ELF section
============================== [SUCCESS] Took 48.12 seconds ==============================
Terminal will be reused by tasks, press any key to close it.
Hi.
You can ignore the warning now.
Test the example, if should work as expected.
Regards,
Sara