🧪 New tutorials are being published — build from robot arms to sensors step by step
Skip to content

Chapter 3: Camera Basics

Buy in Store

Chapter goal: Understand the NanoCam's camera data pipeline and get to know the AI modes built into the firmware.

Principle

The NanoCam connects to the camera through the DVP (Digital Video Port) interface. The GC2145 sensor outputs 8-bit parallel pixel data; the ESP32-S3's LCD_CAM peripheral stores it directly into PSRAM via DMA, and the HTTP server then streams it to the browser in MJPEG format.

Key Concepts

  • DVP: 8 parallel data lines + 3 synchronization signals (VSYNC/HREF/PCLK)

  • MJPEG: each frame is an independent JPEG image; the browser loads them continuously to create a video effect

  • PSRAM: 8MB PSRAM used as the frame buffer, holding 2-4 frames

Steps

3.1 Viewing the Default Image

After flashing, the firmware is in streaming mode by default; open http://<IP> in a browser to see the image.

CommandFunction
ai_mode:0\rVideo transmission module
ai_mode:1\rCat face detection
ai_mode:2\rFace detection
ai_mode:3\rColor recognition
ai_mode:4\rFace recognition
ai_mode:5\rQR code scanning

For the complete AI modes and serial commands, see the Serial Protocol Manual.

Next chapter: Chapter 4: Face Detection