Page 1 of 1

Controlling the LED

Posted: Sun Sep 27, 2020 10:07 pm
by RogerInHawaii
Is there a way to control the LED that's used for "flashing" when a picture is being grabbed into the Frame Buffer?

Is there a way to directly turn that LED on and off?

Is there a way to control the brightness when it's on?

Is there a way to DISABLE it so that it does not flash when a picture is being grabbed into the Frame Buffer?

Re: Controlling the LED

Posted: Mon Sep 28, 2020 8:08 am
by ESP_Sprite
On what hardware? In general, LEDs like that tend to be connected to a GPIO; in that case you should be able find the lines that control it in software.

Re: Controlling the LED

Posted: Fri Oct 02, 2020 5:38 pm
by xgarbxgarb
On the ESP32-CAM something like this should work.

Code: Select all

void setup() {
  pinMode(4, OUTPUT);// initialize io4 as an output for LED flash.
  digitalWrite(4, LOW); // flash off/
}

void smile(){
  digitalWrite(4, HIGH); // flash on
  take_photo();
  digitalWrite(4, LOW);
}
Full code is here: https://github.com/robotzero1/esp32cam- ... fieCam.ino

I'm not sure you can do PWM on that pin.

Your RGB888 tests here https://www.esp32.com/viewtopic.php?f=32&t=17479 were interesting. I learnt a lot from this thread.