Hi! I have been following this blog page link example for a few days now trying to get the generic Example of ESP32 CameraWebServer with Flash from ESP32 Framework 1.0.6 to be ported into current latest ESP32 Framework 2.0.4 to work but failed.
I came to understand the ESP32 Framework 2.0.4 has changed a lot compare to the old Framework 1.0.6 and it will not work even though there is no compilation errors.
Attached are two sets of files I dedicated for this ESP32 CameraWebServer Flash Light project for your analysis and troubleshooting on ESP32 Framework 2.0.4 Board Manager Library under Arduino IDE version 1.8.19 software on Windows 10.
I have created a set of batch files to aid in flashing 20 pcs of of Ai-Thinker ESP32-CAM to work on ESP32 Framework 1.0.6 and 2.0.4 for the purposes of easy trouble free batch processing.
Hi Rodyeo,
I check the 2.0.4 version of CameraWebServer, and I put on working with these changes.
In the main CameraWebServer.ino I add these lines.
const int pwmfreq = 50000; // 50K pwm frequency
const int pwmresolution = 9; // duty cycle bit range
ledcSetup(config.ledc_channel, pwmfreq, pwmresolution); // configure LED PWM channel
ledcAttachPin(4, config.ledc_channel); // attach the GPIO pin to the channel
after the setting of camera_config_t config; structure
And in the file app_attpd.cpp after the include I add these lines:
//
// LED Illuminator
//
#define CONFIG_LED_ILLUMINATOR_ENABLED
#define CONFIG_LED_LEDC_PIN 4
#define CONFIG_LED_MAX_INTENSITY 255
//#define CONFIG_LED_LEDC_LOW_SPEED_MODE
// CONFIG_LED_LEDC_HIGH_SPEED_MODE is not set
#define CONFIG_LED_LEDC_TIMER LEDC_TIMER_0
#define CONFIG_LED_LEDC_CHANNEL LEDC_CHANNEL_0
// end of LED Illuminator
I still get compilation error using your two files attached. I believe you are still using the older copy of 2.0.4 with bugs issue 6996 as highlighted a few weeks ago…
I copied the two files you gave and override the sample file I attached earlier in my previous post and this are the compilation error I got…
This errors looks similar to my previous bug report to Espressif github … Error Compiling… Arduino IDE version 1.8.19 … Board Manager … ESP32 Espressif System version 2.0.4 INSTALLED #6996 https://github.com/espressif/arduino-esp32/issues/6996
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp: In function ‘esp_err_t stream_handler(httpd_req_t*)’:
app_httpd.cpp:782:35: error: ‘ra_filter_run’ was not declared in this scope
uint32_t avg_frame_time = ra_filter_run(&ra_filter, frame_time);
^~~~~~~~~~~~~
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:782:35: note: suggested alternative: ‘ra_filter_t’
uint32_t avg_frame_time = ra_filter_run(&ra_filter, frame_time);
^~~~~~~~~~~~~
ra_filter_t
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp: In function ‘void startCameraServer()’:
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1225:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1225:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1225:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1231:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1231:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1231:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1237:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1237:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1237:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1243:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1243:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1243:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1249:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1249:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1249:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1255:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1255:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1255:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1261:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1261:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1261:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1267:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1267:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1267:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1273:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1273:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1273:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1279:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1279:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1279:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1285:25: warning: missing initializer for member ‘httpd_uri::is_websocket’ [-Wmissing-field-initializers]
.user_ctx = NULL};
^
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1285:25: warning: missing initializer for member ‘httpd_uri::handle_ws_control_frames’ [-Wmissing-field-initializers]
C:\Users\god\Downloads\esp32_new_camera_web_server\app_httpd.cpp:1285:25: warning: missing initializer for member ‘httpd_uri::supported_subprotocol’ [-Wmissing-field-initializers]
Multiple libraries were found for “WiFi.h”
Used: C:\Users\god\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Using library WiFi at version 2.0.0 in folder: C:\Users\god\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\WiFi
exit status 1
‘ra_filter_run’ was not declared in this scope
This reply was modified 1 year, 4 months ago by Renzo Mischianti.
This reply was modified 1 year, 4 months ago by Renzo Mischianti.
Hi! I used your inserted your code modification into my CameraWebServer204FlashFailed.zip version I send you earlier with no compilation errors cause I used the latest fix copy from the Espressif Developer … https://github.com/…/ESP32/examples/Camera/CameraWebServer
Yes! Great! Thanks alot! Your new code is working now with the LED Illuminator slider function. It will be nice to also have the Flash toggle switch On / OFF to as a flash light features too if possible similar to Framework version 1.0.6 style?
I shall help you promote your great works to all my IoT group members globally 😉 Thank you again sir Renzo. I am so happy to have bump into your blog and your great dedication to Open SOurce Community projects. Bravo!
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew1.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew2.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew3.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew4.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew5.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew7.PNG
Here is a little sequential order documentation of all the changes starting from your contribution modification Sir Renzo … CameraWebServer204FlashNew60.PNG
This is the said working source code “CameraWebServer204Flash.zip” with the LED Illuminator slider features which activated when Still Image Photo or Video Streaming Video is triggered.
I decide not to be over demand in request porting version 1.0.6 flash codes into this 2.0.4 LED illuminator source code in respect of the author Renzo creations, therefore this new LED illuminator intensity control slider features is much better than previous LED Flash toggle switch method at older source code implementation. Many thanks to Sir Renzo for all his hard work and effort. Bravo! … CeraWebServer204LEDilluminator.zip
*** Note the default is set to 50K PWM frequency for the LED Flash Light to sync with certain country AC electric supply at 50Hz. I experiences horizontal running lines on the web ui video output screen. My country AC is 60Hz therefore my PWM frequency is supposed to be 60K instead. Correct me if I am wrong?
Maintaining a repository (or site or forum) is a lot like tending to a garden - it requires constant care and attention to keep it thriving. If you're a skilled gardener (or coder!) and want to help keep our repository blooming, we'd love to have you on board! We're also looking for talented writers and forum moderators to help us grow our community. Interested in joining our team? Don't hesitate to reach out and let us know how you can contribute!
Are you a fan of electronics or programming? Share your knowledge with others, write a simple tutorial or how to make a great project Contact me: share_your_ideas@mischianti.org
The content displayed on this website is protected under a CC BY-NC-ND license. Visitors are prohibited from using, redistributing, or altering any content from this website for commercial purposes, including generating revenue through advertising. Any unauthorized use is a violation of the license terms and legal action may be taken against individuals or entities found to be in violation.
You must also provide the link to the source.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.