Hello.
I am working with the ESP32 CameraWebServer example and I found a bug and also have the fix. Now I want to contribute this fix in Git hoping that new users will get a better example in the future.
Question:
What is the URL to the GIT repository of the ESP32/Camera/CameraWebServer example?
About the fix:
On line 83 LED_LEDC_GPIO is defined as pin 22 but on my board it is pin 4.
This can be fixed by replacing ledcAttach by ledcAttachChannel and ledcWrite by ledcWriteChannel.
I am 99% sure that bug is due to you using the V3.x boards, if you revert to 2.0.17 it will work. There are a bunch of breaking changes on the ESP32 documented at https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html
I am sure the author of the example is aware and making all the changes needed but go ahead and add an issue. Be sure to put yourself on the notify list for updates to the issue.
Hi ptillisch,
I saw that Github page, but also saw that the app_httpd.cpp was very different.
Like the example in my Arduino IDE contains also a lot of code for face recognition.
The app_httpd.cpp in Github is 849 lines, the example in my Arduino IDE is 1333 lines.
However, both carry the same bug.
When I start a new sketch and use File -> Examples -> ESP32 -> Camera -> CameraWebServer I get the same long app_httpd.cpp.
I have recently downloaded and installed the Arduino IDE 2.3.4 on a new Windows laptop.
What did I do wrong?
@sonofcy the example is bundled with the platform, so as long as you open it from the File > Examples > ESP32 > Camera > CameraWebServer menu in Arduino IDE, the example should always be compatible with the version of the platform you have installed. If there is an incompatibility then that is a bug in the example and should be fixed.
The code you see in the repository is the latest development version. Unless you are using the beta tester version of the platform, you will instead have an older revision of the platform code on your computer.
Please do this:
Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
Scroll down through the list of boards platforms until you see the "esp32" entry.
In the platform entry, you will see the version number you have installed (e.g., "3.1.0 installed"), add a reply here on the forum thread to tell us which version you see there.
The max version of ESP32 is 3.07.
After changing the additional board manager URL I could update to 3.1.0.
Now a new CameraWebServer sketch has the same app_httpd.cpp as in Github. @sonofcy Thanx for the correct JSON URL.
Not yet. I thought I'd make a fork, make the fix and then make a pull request with the explanation. I have read that somewhere.
Which Git forum? Is that the way to do it?