Alaric Moore

hardware

Things with circuits, sensors, and solder. Firmware is yours to download — bring your own secrets.h where a sketch asks for one.

terraview — ESP32-CAM pinout & the OV3660-clone quirk

The board is a stock AI-Thinker ESP32-CAM. These pins are fixed by its traces, not a wiring choice — collected here so the map is in one place. The full reference (power, SCCB fix, KY-015) is in the downloadable notes.

SignalGPIOSignalGPIO
PWDN32D7 (Y9)35
RESETD6 (Y8)34
XCLK0D5 (Y7)39
SIOD (SDA)26D4 (Y6)36
SIOC (SCL)27D3 (Y5)21
VSYNC25D2 (Y4)19
HREF23D1 (Y3)18
PCLK22D0 (Y2)5

KY-015 (DHT11): DATA → GPIO 13, VCC → 3V3 (not 3.7 V), GND common. Stream at XCLK 10 MHz / VGA — 20 MHz gave garbage frames.

Why it "wouldn't work": the sensor was an OV3660 clone mislabeled as an OV2640. It hard-refuses four cosmetic auto-white-balance registers over SCCB, and the stock esp32-camera driver aborts the whole init on the first refused write — so the camera never came up, in Arduino or ESP-IDF. Nothing was wired wrong. Fix: two edits to sccb.c's SCCB_Write16() — retry each write up to 8×, and return 0 on a NAK instead of aborting — plus SCCB clocked at 20 kHz and the camera init'd first in app_main.