Library / SDK
yoursunny/esp32cam avatar
yoursunny/esp32cam

esp32cam: an object oriented camera API for the ESP32

OV2640 camera on ESP32-CAM, Arduino library

687 stars205 forksC++ISC

At a glance

What is it?
The esp32cam library gives Arduino sketches an object oriented wrapper over the Espressif ESP32 camera driver for OV2640 and OV3660 sensors, tested on the AI Thinker ESP32-CAM, the Seeed XIAO ESP32-S3 Sense and ESP32-S3-CAM boards. Installation is by cloning into the Arduino libraries directory.
Who is it for?
esp32cam is the right pick if you are writing an Arduino sketch that needs a camera and would rather not call the Espressif driver API directly, since it gives you an object oriented surface on top of it and the board pin mappings are already collected.
Can I use it commercially?
Yes. ISC is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 89 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A wrapper over the Espressif camera driver

The esp32cam library provides an object oriented API to use an OV2640 camera on an ESP32 microcontroller, and it is described plainly as a wrapper of the Espressif ESP32 camera driver. That single sentence sets the scope and the value proposition at once. The Espressif driver is the component that actually talks to the sensor over the camera interface, and it is the component that carries the register sequences, the frame buffer handling and the timing. What this library adds is a shape in which that functionality is reached as objects rather than as a set of free functions operating on a global handle. The project publishes Doxygen documentation at esp32cam.yoursunny.dev, a hashtag on Twitter for the library, and a video tutorial. The language is C++, the licence is ISC, and the default branch is main. The repository also carries a `.clang-format` file, a `library.properties` file for the Arduino library manager, a `mk/` directory and a `docs/` directory alongside the sources.

Which boards and sensors are actually verified

The README is specific about tested hardware, and this is the section worth reading before you commit to a board. The library has been tested with the AI Thinker ESP32-CAM, the Seeed Studio XIAO ESP32-S3 Sense, and an unbranded ESP32-S3-CAM dev board sold on AliExpress with an ESP32-S3-N16R8 chip. The third of those is a good example of the kind of detail that saves time, because the exact chip variant determines the PSRAM and flash layout. Beyond those three, the file `src/esp32cam/pins.hpp` lists several other boards contributed by users, which is how board support accumulates in a library like this: the tested set is small and named, and the wider set is community supplied in one header file. On the sensor side, the library has been tested with the OV2640 and the OV3660 camera sensors, and the README takes a measured position on the rest, saying it is likely compatible with other camera sensors supported by the driver. Likely is not confirmed, so an unusual sensor is an experiment rather than a supported configuration.

Installing without a package manager

The installation path is manual and takes five steps, which is the norm for a library distributed this way rather than through the Arduino library manager registry. You need the ESP32 Arduino core version 3.x installed. You clone the repository into the `$HOME/Arduino/libraries` directory, which is where the Arduino IDE looks for user installed libraries. You select your board in the IDE and enable external PSRAM, which matters because a camera frame buffer does not fit in the internal memory of the chip. You add the include directive for the library header to your sketch, and then you look at the examples directory to see how it is used. The absence of a release process is consistent with this approach. The repository has no GitHub releases, so there is no version to pin and no changelog to read, and a build badge for the GitHub Actions workflow is the only CI signal on the front page. A project with a single maintained board list, a single upstream driver it depends on, and no tagged releases is a project where you track the default branch and test it yourself.

Two examples that show the intended shapes

The repository ships two example directories, and the choice between them is the fastest way to understand what the library is for. There is `examples/AsyncCam/` and there is `examples/WifiCam/`. The names point at the two things you build with a camera on a microcontroller: taking pictures on a schedule or in response to something, and serving them over a network. The `AsyncCam` example reflects the fact that an ESP32 sketch is already built around asynchronous work, so a camera operation that takes time to complete has to be structured as a coroutine rather than as a blocking call. The `WifiCam` example reflects the other common requirement, which is making the pictures visible to something outside the board. Neither example is described in detail in the README beyond pointing you at the directory, so the examples are the documentation, along with the Doxygen reference. That is a real limitation of the project as presented: there is no narrative walkthrough, no API guide in the README itself, and no documented configuration surface, so you learn the interface by reading the headers and the examples.

What a wrapper does and does not buy you

The honest assessment of a wrapper library is that it trades a small amount of surface area for a large reduction in the code you write, and it caps what you can do at what the wrapped component does. On the first side, an object oriented API means the camera is a thing you hold, and configuring pins, the sensor and the frame buffer is a matter of construction rather than a sequence of calls with a global state argument. That is what makes the difference between a sketch you can reason about and one you cannot, and it is also why the `pins.hpp` file can collect board definitions for boards you have never seen. On the second side, the cap is real. If a feature you need is missing from the Espressif driver, this library cannot supply it, because the feature would have to be added upstream. The library's own value is therefore inseparable from the health of the driver it wraps, and the README points at the driver repository as the underlying implementation. For an evaluator, the practical question is not whether the wrapper is good but whether the driver underneath currently has what you need.

Where the board list becomes the bottleneck

There is one limitation that is more about hardware than software, and it is worth naming. The camera support depends on PSRAM being available and enabled, and the configuration of the chip determines whether it is. The AI Thinker ESP32-CAM and the ESP32-S3 family are covered by the tested list, with the AliExpress board named down to its ESP32-S3-N16R8 chip, but a board with a different memory configuration can present itself as an ESP32 and still fail. The evidence for that is in the README itself, in the instruction to enable external PSRAM and in the precision of the chip designation for the third tested board. The second limitation is the sensor coverage, where OV2640 and OV3660 are verified and everything else is described as likely. The third is the maintenance surface. There is one wrapper, one upstream driver, an Arduino core that must be on version 3.x, and a board list that users extend by hand. That is a small number of moving parts, which is a virtue, and it also means that when something breaks you are the one who has to work out which layer it is.

Editorial conclusion

esp32cam is the right pick if you are writing an Arduino sketch that needs a camera and would rather not call the Espressif driver API directly, since it gives you an object oriented surface on top of it and the board pin mappings are already collected. It is the wrong choice if you need a feature the underlying driver does not have, because the library is a wrapper and not a replacement, and it is the wrong choice if you need PSRAM-driven high resolution streaming work that is better served by the Espressif examples directly. Before you install, confirm your board is one of the tested ones, enable external PSRAM in the board settings, and check that the ESP32 Arduino core version you have is in the supported 3.x line. The last push was on 2026-07-26, the licence is ISC, and the repository publishes no GitHub releases.

Frequently asked questions

How do I install the esp32cam library in the Arduino IDE?

The README gives five steps: install the ESP32 Arduino core v3.x, clone the repository under the `$HOME/Arduino/libraries` directory, select your board and enable external PSRAM, add `#include <esp32cam.h>` to your sketch, and check the examples directory for usage. The library is not installed through the Arduino library manager.

Which boards and camera sensors does esp32cam support?

It has been tested with the AI Thinker ESP32-CAM, the Seeed Studio XIAO ESP32-S3 Sense and an unbranded ESP32-S3-CAM dev board with an ESP32-S3-N16R8 chip. Other boards are listed in `src/esp32cam/pins.hpp`, contributed by users. The OV2640 and OV3660 sensors are tested, and other sensors supported by the Espressif driver are described as likely compatible.

Does esp32cam need external PSRAM on the ESP32?

The installation steps say to select your board and enable external PSRAM, which is required to hold camera frame buffers. The README also names the exact chip variant of the ESP32-S3-CAM board it was tested with, since the memory configuration differs between boards sold under the same name.

Official sources

  1. Issues
  2. License: ISC
  3. Project website
  4. README
  5. yoursunny/esp32cam on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yoursunny-esp32cam.svg)](https://hysenlabs.com/projects/yoursunny-esp32cam)

Was this useful?