First 3 TOP actions here would be:
- Power the camera via a MOSFET or using VEXT if your board supports it, only power it in the second that you take the picture and then disconnect it the hard way DONE!
NOTE: Although some boards like Heltec ESP32 claim that they support up to 200mA in VEXT, at least OV5642 is above that, almost reaching 300mA and then Voltage will go down and it won't work. Use always an external MOSFET unless it's guaranteed that VEXT supports at least 350mA.
- Same with OLED display show anything for no more than 8/10 seconds, then make it off (Or sleep NOT DONE)
- If you don't do any server.handleClient() action or you don't press the shooter the ESP32 will go into Deep sleep mode ( Not sure if it makes sense a sleepAfterMinutes new setting, for the moment no )
Starting taking the necessary steps to make the battery last longer: