Application Note #9 - ESP32-CAM Web Server - with Arduino IDE

Objectives

  • connect and program an ESP32-CAM as a streaming video server
  • to that end
    • choose and purchase an ESP32-CAM dev board
    • download documentation
    • connect the FTDI programmer
    • program the ESP32-CAM with the web server as described in the Kee Yees documentation (tutorial)

Description

  • create an ESP32-CAM based video streaming server

Platform

  • CentOS Stream release 8
  • Arduino IDE

=============================================================================

References

  1. Reference 1 : Kee Yees ESP32-CAM on Amazon…
  2. Reference 2 : Amazon Order…
  3. Reference 3 : KeeYees ESP32-CAM product web page…
  4. Reference 4 : KeeYees ESP32-CAM Tutorial (my gdrive copy of ESP32-CAM.zip downloaded from Reference 2)…
  5. Reference 5 : ESP32-CAM-KIT-English.pdf extracted from Reference 3…
  6. Reference 6 : Espressifs github repo for camera web app software…
  7. Reference 7 : Comprehensive ESP32 Reference……
  8. Reference 8 : Camera web server and home assistant…
  9. Reference 9 : Howto use the built in LED…
  10. Reference 10 : ESP32 Cam + node-red + home assistant…
  11. $10 DIY Wireless IP Security Camera for 3D Printers & Home…

Procedures

Step 1

Choose an ESP32-CAM dev board

  • I chose the Kee Yees ESP32-CAM dev board shown in Reference 1… because it was an Amazon Choice, good reviews, it was cheap and documentation was available on the web site (Reference 3… and Reference 4…).

Step 2

Purchase the device

  • (see Reference 2…). Ordered form Amazon.ca, May 24, 2020 for 22.99$

Step 3

Get documentation

Step 4

Install software

  • Install requisite software in CentOS

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # Install python3 and python2 
    sudo dnf install python2
    # See : (https://linuxize.com/post/how-to-install-python-on-centos-8/)
    sudo dnf install python3
    # use python2
    sudo alternatives --set python /usr/bin/python2
    # install pyserial
    sudo pip2 install pyserial
    # set permissions on /dev/ttyUSB0
    # https://www.arduino.cc/en/guide/linux#toc6
    ls -l /dev/ttyUSB0
    sudo usermod -a -G dialout fcarella
    # logout/log back in
  • Install arduino ide in arch

    1
    2
    sudo pacman -S arduino
    sudo pacman -S arduino-avr-core

    Step 5

    Program the ESP32-CAM

    Connect the ftdi (see Reference 5, Page 11…)

  • use the ftdi USB to TTL Serial Converter to connect esp32 to the computer for programming

Setup ARDUINO IDE for ESP32 programming

  • Install the Arduino ESP32 Module addon in the Arduino IDE as described in the docs… starting from the bottom of page 7

    • In the IDE
      File/Preferences
      in
      Additional Boards Manager URLS
      add
      https://dl.espressif.com/dl/package_esp32_index.json

    • then, in the IDE menu, choose
      Tools/Boards/Board Manager/Choose ESP32-Wrover Module

  • Load CameraWebServer app as described in docs

  • In your Arduino IDE, go to
    File > Examples > ESP32 > Camera
    and open the CameraWebServer example.

  • then in the software change settings to

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // Select camera model
    //#define CAMERA_MODEL_WROVER_KIT
    //#define CAMERA_MODEL_ESP_EYE
    //#define CAMERA_MODEL_M5STACK_PSRAM
    //#define CAMERA_MODEL_M5STACK_WIDE
    #define CAMERA_MODEL_AI_THINKER

    #include "camera_pins.h"

    const char* ssid = "********";
    const char* password = "********";

NOTES**

  • I was getting brownout errors but I just unplugged and plugged in usb and it works!!

Screenshots

back to Series…