pdf-icon

Arduino Guide

M5Unit CAMS3-5MP Program Compilation and Flashing

1. Preparation

    1. Install Arduino IDE: Refer to Arduino IDE Installation Guide to complete the IDE installation.
    1. Install Board Manager:
    • Open Arduino IDE, go to the toolbar > File > Preferences
  • In the Additional Boards Manager URLs field, enter
    https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
    
  • Click the Board Manager option in the sidebar, type ESP32, and select the latest version of esp32 by Espressif Systems to download.
    1. Connection Diagram

2. Replace ESP-Camera Static Library

  1. Unzip libespressif__esp32-camera.zip
  1. Copy libespressif__esp32-camera.a to the specified path

    • For Windows:
   C:\Users\[UserName]\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.[x-xxxxxxxxx]\esp32s3\lib\libespressif__esp32-camera.a
  • For macOS:

       /Users/[UserName]/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.[x-xxxxxxxxxxx]/esp32s3/lib/libespressif__esp32-camera.a
    
  • For Linux:

       /home/[UserName]/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.[x-xxxxxxxx-xx]/esp32s3/lib/libespressif__esp32-camera.a
    
  1. Copy the header files esp_camera.h and sensor.h to the specified path
  • For Windows:
      C:\Users\[UserName]\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.[x-xxxxxxxx]\esp32s3\include\espressif__esp32-camera\driver\include
    
  • For macOS:

    /Users/[UserName]/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.[x-xxxxxxxx-xx]/esp32s3/include\espressif__esp32-camera\driver\include
    
  • For Linux:

      /home/[UserName]/.arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.[x-xxxxxxxx-xx]/esp32s3/include\espressif__esp32-camera\driver\include
    

3. Get Demo Program

Unit CAMS3-5MP Arduino Demo CameraWebServer

  • Unzip this archive and open CameraWebServer.ino
  • Configure the Wi-Fi name and password you want to connect to in the code

4. Program Compilation & Flashing

Board Selection Notes
1. Board Selection: Tools -> Boards -> ESP32 -> M5UnitCAMS3
2. USB CDC Configuration: Tools -> USB CDC On Boot -> Enabled
3. PSRAM Configuration: Tools -> PSRAM -> OPI PSRAM

5. Image Preview

  • Upload the program
  • Reinsert the USB cable, open the serial monitor, set the baud rate to 115200, and reopen the serial monitor to see the output of the local IP address
  • Enter the IP address in a browser and click "Start Stream" to view the image
On This Page