# 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.

![](/files/OPcKCaJu8VkUvUygM9SO)

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

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

![](/files/5edFqm6hGXOFr4iUSL4S)

Restart Arduino.

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

![](/files/PU0ilkAybPnrEcWUcLbm)

Search and install the esp32.

![](/files/hfI8ndykuA65sGh0dJHZ)

After installation, select "".

![](/files/53HoG38LUGWmWnzo3Tfu)

## Configure Example Code

![](/files/rfHu4ChOY88NEzbzSp9z)

Change the define to use `CAMERA_MODEL_AI_THINKER`.

![](/files/KeEa5LXDhOfd5Nl971kj)

## Wiring

![](/files/kdG4cQ8hJKyAACGpfBMP)

![](/files/wyFiPCp8W3CgaJgAdPxT)

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.

![](/files/Gjsx315XoiIaLHVk0dwK)

![](/files/0JbFvt7weFDDuIlwpYdH)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tk233.gitbook.io/notes/electrical/esp32-cam.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
