Skip to content

mozgy/esp32-cam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp32-cam

ESP32 Cam - TimeLapse, Streaming, Prusa Connect ..

Hardware

ESP32-CAM board with OV2640 camera module, there are several hardware versions of the board

  • original AI-Thinker board
  • different copies, some exact some with notable differences
  • S3 version with more PSRAM, faster

Flashing HW helper boards

  • CH340 chip, USB micro

  • CH340 chip, USB C, passtru dupont connectors for prototyping

Pinout

Instalation

Insert ESP32-CAM into helper board and connect it to PC.

Visual Studio Code with PlatformIO IDE

VSC with PlatformIO

Arduino IDE

Gremlins ate this part - rewrite needed ..

Using Camera

Connect to the DHCP assigned IP and try several sublinks from next chapter!

Notable Weblinks

Web server listening port is 8080, changed from default 80 for easier router port-mapping, configurable at start of Web Server code

  • {CAM_IP:8080}/login
    enter credentials
  • {CAM_IP:8080}/espReset
    force complete ESP32-CAM reset
  • {CAM_IP:8080}/sdcard
    reinit SD Card after (re)inserting microSD
  • {CAM_IP:8080}/metrics
    output metrics for prometheus/grafana nerds
  • {CAM_IP:8080}/scan
    JSON display of neighbour WiFi SSID/Channels
  • {CAM_IP:8080}/archive
    browse saved timelapse pictures
  • {CAM_IP:8080}/prusa
    force upload of last captured photo to Prusa Connect

Configuration details

  • Camera Model
    uncomment only one of the #define that is correct for your camera board
    if you are using ESP32S3-CAM also copy ESP32S3-CAM board definition to PlatformIO dir C:\Users....platformio\platforms\espressif32\boards dir and use 'board = esp32s3cam' in PlatformIO ini
  • Config Definitions
    several interesting #defines
    • set #undef HAVE_CAMERA if you don't want to use camera (OV sensor misbehaving or similar)
    • set ESP_CAM_HOSTNAME for your cam board name
    • set CAM_SERIAL if you have several camera boards
    • set FLASH_ENABLED true if you want to use flash LED
    • set #undef HAVE_SDCARD if you don't want to use microSD
    • set TIME_LAPSE_MODE true for camera board to start saving interval photos to microSD
  • Prusa Connect Setup
    • login to Prusa Connect
    • choose registered printer
      • open 'Camera' menu
      • click on 'Add new other camera' and note Token text (copy to clipboard)
      • paste that text in credentials line
        static const char* prusaToken = "paste_here";
      • generate fingerprint text with uuidgen command and paste that text in credentials also
      • compile and upload the firmware to the cam board, in a minute or so picture should be appearing on Prusa Printer Web

ToDo

  • [] add AP/Config mode at the very first start
  • [] add GUI config mode for hardcoded #defines
  • [] rewrite archive GUI to be much more pwetty
  • [] better doc about all hardcoded links
  • [] better doc about PC USB drivers