The original ESP32 Cam board doesn't have a micro USB socket for programming so many temporary connections are needed to program it. 

Program it using an Arduino Uno or a FTDI board. Correct wiring is at 1:00.

Or get a ESP32 Cam shield with a micro USB socket.

This doesn't easily allow access to the I/O when connected though.

Some newer ESP32 Cam boards do have integrated CH340 USB built in like other microcontrollers. I will try these instead. May have to load CH340 drivers if needed.

Setup Arduinio IDE: 

There are a lot of YouTube videos about the ESP32 Cam board. Including pan and tilt with servos.

I will also try a much higher quality camera the OV5640 to replace the OV2640. 2592x1944 max resolution.

At 1:30 he puts the OV5640 onto a standard ESP32 Cam board. You can buy the OV5640 separately. There is even an auto focus version that can be used like a microscope.

There is a way to get wireless OTA programming as well but the default doesn't work. I use OTA programming for all the other microcontrollers.

The email ESP32 Cam was sometimes sending only a partial or no pic so also added a SPIFFS format statement in the setup to correct this. Sends photo every 1/2 hr if bright enough. Removes photo from SPIFFS after email sent.

Code added to example from :

bool formatted = SPIFFS.format(); //formats SPIFFS if corrupt and only partial picture

void loop() {

    if (digitalRead(2) == LOW) digitalWrite(33, LOW); // turn on built-in red LED if dark        

 if (digitalRead(2) == HIGH) {      digitalWrite(33, HIGH);  // if bright enough turn off red LED and send photo

 capturePhotoSaveSpiffs();      sendPhoto();      

SPIFFS.remove("FILE_PHOTO"); // remove photo after email sent     

delay (1800000); // wait 1/2 hour