espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.73k stars 7.43k forks source link

ESP32-CAM CameraWebServer web ui LED Intensity Illuminator option source code fixed by Renzo @ https://www.mischianti.org #7009

Open rodyeo opened 2 years ago

rodyeo commented 2 years ago

Related area

ESP32-CAM LED Flash light

Hardware specification

ESP32-CAM AI-Thinker board

Is your feature request related to a problem?

Finally found a source code fixed of the long awaited ESP32-CAM CameraWebServer LED Illuminator controls fix is here. https://www.mischianti.org/forums/topic/esp32-cam-upgrade-camerawebserver-with-flash-on-esp32-framework-2-0-4/ Now the LED Intensity slider from 0 to 255 works as designed to control the LED brightness intensity when Get Still Image is pressed or Start Stream Video is pressed.

Describe the solution you'd like

Example of a programmer Renzo source code worked on ESP32 Framework 1.0.6 but failed on 2.0.4 as tested. https://www.mischianti.org/2021/09/12/esp32-cam-upgrade-camerawebserver-with-flash-features-2/

Describe alternatives you've considered

Thereafter he created a fix source code that now works on ESP32 Framework 2.04 as verified. https://www.mischianti.org/forums/topic/esp32-cam-upgrade-camerawebserver-with-flash-on-esp32-framework-2-0-4/

Additional context

Please update this source code segment which works into the master branch for community usage. https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Camera/CameraWebServer

I have checked existing list of Feature requests and the Contribution Guide

rodyeo commented 2 years ago

The ESP32-CAM Flight Light LED Illuminator solution which everyone is awaiting is now resolved by the blog author and programmer Bye Renzo

https://www.mischianti.org/forums/topic/esp32-cam-upgrade-camerawebserver-with-flash-on-esp32-framework-2-0-4/

Thank you ;)

rodyeo commented 2 years ago

Manually Forked from Master branch the source code ... https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Camera/CameraWebServer

BOF - CameraWebServer.ino - Insert into line number 74 to 79

//<!–– Begin --- Flash LED https://www.mischianti.org/2021/09/12/esp32-cam-upgrade-camerawebserver-with-flash-features-2/ ––> 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 //<!–– End --- Flash LED https://www.mischianti.org/2021/09/12/esp32-cam-upgrade-camerawebserver-with-flash-features-2/ ––>

EOF - CameraWebServer.ino - Insert into line number 74 to 79

BOF - app_httpd.cpp - Insert into line number 23 to 35

//<!–– Begin --- Flash LED https://www.mischianti.org/2021/09/12/esp32-cam-upgrade-camerawebserver-with-flash-features-2/ ––> // // 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 //<!–– End --- Flash LED https://www.mischianti.org/2021/09/12/esp32-cam-upgrade-camerawebserver-with-flash-features-2/ ––>

EOF - app_httpd.cpp - Insert into line number 23 to 35

Forum post request is granted by author Renzo @ https://www.mischianti.org/forums/topic/esp32-cam-upgrade-camerawebserver-with-flash-on-esp32-framework-2-0-4/

Thanks ;)

Rodney