# ESP32 Cam

## Version Requirements

Unfortunately, there are some version combinations that cannot work.

The working one is

|                     |             |   |
| ------------------- | ----------- | - |
| Arduino IDE         | 1.8.19      |   |
| esp32 board package | 1.0.6       |   |
| ESP32-CAM Board     | ESP32-S     |   |
| Camera Module       | DC-26 40-V3 |   |

## Add ESP32 Boards to Arduino IDE

Open Arduino, select File -> Preferences.

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-aedcc1fa0711a57d9d7052207e40a2f3e1a609d1%2Fimage.png?alt=media)

Add the following URL to the "Additional Boards Manager URLs" section:

```
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
```

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-a1c3ec50c0f514826e8a6931e537e20d147b262e%2Fimage.png?alt=media)

Restart Arduino.

Go to Tools -> Board -> Boards Manager...

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-6f35237421bc284d6539f455787708dd5d71f3f2%2Fimage.png?alt=media)

Search and install the esp32.

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-f370500a39a2c0a0075a5d825592a56b44bf530d%2Fimage.png?alt=media)

After installation, select "".

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-1d9d456218efe17b0d5475586d82570190f18003%2Fimage.png?alt=media)

## Configure Example Code

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-7af013241ffe9b0b9ab5a42c22f94047e36e9087%2Fimage.png?alt=media)

Change the define to use `CAMERA_MODEL_AI_THINKER`.

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-8d465fdf542a1e4bb5512f61e2be45ff82c9eecc%2Fimage.png?alt=media)

## Wiring

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-863c5ea0640ba8fafabec304a6ae7fb281781af9%2Fimage.jpg?alt=media)

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-3ca0a9190fd865f845331210cd8f593a0208b86a%2Fimage.jpg?alt=media)

Note: do NOT use the GND pin near U0T pin (the one labeled "GND/R"). That pin does not connect to ground for some of the boards.

After plugging in the debugger, select the corresponding COM port. No need to change other settings.

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-7d945c6f295131c33e7bfebfae0c2468f2cb3fde%2Fimage.png?alt=media)

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-bcb5cfbabcec15c39307268840a9bf0f15a32ce2%2Fimage.png?alt=media)

After upload, remove the IO0 jumper wire, open Serial Monitor, and click reset button, located at the back of the board.
