Closed victorbnl closed 1 week ago
You have arduino-esp32 v2.x or older, in which WebServer::client()
returns a copy of WiFiClient
:
https://github.com/espressif/arduino-esp32/blob/2.0.17/libraries/WebServer/src/WebServer.h#L112
esp32cam library has been upgraded to work with arduino-esp32 v3.x or newer, in which WebServer::client()
returns a reference of NetworkClient&
:
https://github.com/espressif/arduino-esp32/blob/3.0.0/libraries/WebServer/src/WebServer.h#L161
You need to upgrade to arduino-esp32 v3.x through Arduino Boards Manager.
Uh, PlatformIO does not seem to support arduino-esp32 v3.x natively at the moment. Adding the following into my project’s platform.ini worked as a workaround.
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-rc1
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
I have a class which has a
WebServer webServer
member, as well as a setup function, in which I declare the handlers, including one for testing the camera, as follows.However this produces the following error:
I don’t understand what, in my code, differs from the examples.
Full class
```cpp #include