Page 2 of 3
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Mon Jan 30, 2023 10:31 am
by BenR
Think the £0.73 is just for the programming interface, the complete thing is £4.40 but still a good price.
At least we know that what works for you should also work for me.
I got an IDF web cam project working with the camera which was pretty decent quality, I then maybe spent an hour trying to shoehorn that into Flowcode and then likely got distracted with something else.
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Mon Jan 30, 2023 2:15 pm
by mnfisher
Thanks - that means I don't feel so bad - I think I paid £6 including the programming extension board.
I'll post the code this evening...
Martin
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Mon Jan 30, 2023 6:12 pm
by mnfisher
I think this should do the trick...
So all the steps from the first post - except creating the fc file - use examples.fcfx from below and changes to files examples/main (these are included in the zip file..)
Extract the zip file to examples/main
Do the idf.py fullclean etc from the subsequent message.
Compile and (hopefully) should download and run (make sure there is an sd card in place!) - saving a photo every few seconds....
I've left file names as per espressif (sd_card_example_main.c for example) - but I have modified them (app_main has gone etc) - the names are a good reminder of their origin?
There is very little feedback/error checking - as mentioned I couldn't get the UART to work (and the pins A0, A3 aren't an option when using the esp32 camera board target ?)
For 'timelapse' photography - it would be good to either check if files exist or save a 'count' in eeprom, so it doesn't overwrite on power down / restart. My intention is to use deepsleep and wake every 'interval' seconds, take a snap and then sleep again.
It might be good to pull in the time/date from the web to timestamp the photos..
It should be 'fairly easy' to add a web server and transmit the image over wifi?
Can use led=0/1 to toggle the flash
Martin
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Wed Feb 01, 2023 12:45 pm
by mnfisher
Anyone (Iain/Ben?) manage to get this to compile?
I did a slightly more 'advanced' version - here it attempts to set the RTC from NTP on first run (files have timestamp) and takes a photo every 5s (change 'interval' if needed) - it uses deep sleep to try and minimise battery consumption.
You'll need to set password and ssid (in SetRTC) to connect to wifi...
Note - here I turn the flash on to take the photo - it also shows 'life'. Also that if the SD card isn't inserted it will crash and restart - flash rate is increased..
Martin
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Wed Feb 01, 2023 5:46 pm
by chipfryer27
Hi
Working away at present with no access to hardware. Will try once I get back.
Regards
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Wed Feb 01, 2023 7:19 pm
by mnfisher
Thanks - will be interesting to hear how you get on....
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Wed Feb 01, 2023 11:33 pm
by MJU20
Thanks guys, I wish everybody would share their projects like this one!
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Thu Mar 30, 2023 1:51 pm
by mnfisher
Just set this up with a 5M pixel camera. Powered by 4 x AA onto the 5V/Gnd pins and seems to work well. Takes a photo every 10s - using a class 10 micro SD card and saving as JPG (~450KB)
Have had a pair of owls in the garden and I'm hopeful

Have turned the 'flash' off - to avoid alarming them, in the (very) unlikely event I get a photo..
Martin
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Thu Mar 30, 2023 3:47 pm
by mnfisher

- Owl.JPG (99.02 KiB) Viewed 5221 times
Not with the esp32!
Re: ESP32 - Reusing example source - Esp32-Camera
Posted: Thu Mar 30, 2023 4:07 pm
by medelec35
That is still a great picture!