Open guilhae opened 3 years ago
Suggestion: use and external RTC like the DS3231 and if it's daylight time, setup the camera normally; if it's nighttime config the camera with raduprv's registers.
Setting the camera 'normally' will not work. You will still get an overexposed image.
Ok, I thought it would be possible to capture a frame before s->set_reg(s,0xff,0xff,0x01);//banksel
, that is, without modifying playing with the registers.
You can, but did you try doing that in a bright day outside?
With your code I have not tried to take photos without modifying the registers, but with other codes that dont modify them I have not had problems of overexposure:
Well, my program is based on one of the sample programs, the one with the web streaming. And there it is also overexposed in bright daylight. Can you show me the program you used to take the timelapse with?
I dont know if you remember me but we discussed this some months ago during the quarentine:
https://github.com/FBMinis/DS3231-Alarm-ESP32-Cam-Telegram-Bot
It is essential to wait some seconds between camera config and frame capture, otherwise the photos are overexposed or with weird colors. You can see in my project that I config the camera and then connect to wifi, which gives enough time for the sensor to settle.
Here are some photos showing what happens:
https://github.com/cotestatnt/AsyncTelegram2/issues/23#issuecomment-930389447
Yes, I remember that we talked before. But at that time you haven't fixed the issue, so I didn't know you had a solution to that. That's good to know, thanks! I will take a look at it when I have some time. Although in my case it is not ideal to wait, because it just wastes the battery. But will take a look at it anyway :)
Cool, good luck with your tests! I suggest 5 seconds between camera init and fb capture because that's a little over the time it take for wifi to connect. My project takes about 10 seconds to power up and send a photo to telegram/shut down.
So, i tried to make my own code based on this and others, and it kinda works. The exposure works, and its done automatic like FBMinis said, i just set a 3 seconds delay between camera init and the fb capture. But sometimes the code just stops and i dont know why... the led light just keeps kinda on. So i would apreciate help :)
Can you link your code, please?
We know that the big LED is connected to the sdcard lines. Since I dont need the LED, I lift one leg of the transistor to disable it.
https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
Check this code which shows how to have more control over the LED while still using the SDCard:
https://github.com/cotestatnt/AsyncTelegram2/tree/main/examples/ESP32/ESP32-CAM-PIR
So, i tried to make my own code based on this and others, and it kinda works. The exposure works, and its done automatic like FBMinis said, i just set a 3 seconds delay between camera init and the fb capture. But sometimes the code just stops and i dont know why... the led light just keeps kinda on. So i would apreciate help :)
There is some info here you might find useful:
https://github.com/espressif/esp32-camera/issues/203
Normal exposure vs Radu's code (in this case I used frame size XGA and image quality 10 because I dont need high quality images)
This topic has ben receiving some attention here: https://github.com/jameszah/ESP32-CAM-Video-Telegram/discussions/27
I know the author already wrote about this, but i would really like that the light works well. Im new at this, and i could not find any program that just works fine. If someone know any program that do the same and without web interface, or could fix this issue i would apreciate it.