// the find
lemariva/micropython-camera-driver
add camera support to MicroPython
A C extension module that bolts OV2640 camera support onto MicroPython for the ESP32 family, letting you capture JPEG frames from Python on boards like the ESP32-CAM and M5Camera. It wraps Espressif's esp32-camera component and exposes a flat `camera` module with init, capture, and image adjustment calls. The target audience is hobbyists who want to script camera capture without writing C.
The Python API is genuinely simple — `camera.init()` then `camera.capture()` gets you a JPEG buffer in two lines, with pin config exposed for non-standard boards. Pre-built firmware binaries in the repo mean most users never touch a toolchain. PSRAM support for higher-res captures is implemented and documented, including the non-obvious YUV/RGB memory pitfalls. The build instructions cover both the old Make and new CMake eras of MicroPython, which is more than most ports bother to do.
Last commit is October 2023 and the firmware ships against MicroPython v1.18/v1.21.0 — current MicroPython is v1.24.x, so the C module API has likely drifted and you may be on your own compiling it. Only OV2640 is supported; OV5640 and GC0308 boards are out of luck. The build process requires exact commit hashes across three separate repos (MicroPython, esp-idf, esp32-camera), and even a minor deviation breaks compilation — fragile for anyone not already deep in the ESP-IDF ecosystem. BLE is explicitly disabled in the provided firmware because the iram0 segment overflows, which is a real hardware constraint but one that leaves you choosing between camera and Bluetooth.