The ESP32-CAM is one of the most incredible bargains in the maker world. For just a few dollars, you get a powerful Wi-Fi microcontroller slapped together with a tiny camera module. We are going to build a standalone IP surveillance camera. It will host its own web server and stream live video to your phone. Now you can finally figure out which cat is destroying the couch.
(Links above are affiliate links. As an Amazon Associate, we earn from qualifying purchases.)
Because the ESP32-CAM lacks a USB port, wiring it to an FTDI programmer can be slightly tricky the first time.
Wiring to the FTDI Programmer:
CRITICAL STEP: The Flash Jumper To put the ESP32-CAM into “programming mode,” you must connect GPIO 0 to GND before you plug the FTDI adapter into your computer.
IO0 to GND on the ESP32-CAM.IO0 to GND jumper wire, and plug it back in to run normally!If you haven’t used an ESP32 in the Arduino IDE before, you need to add the board manager URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.jsonThe code to stream video is actually built right into the ESP32 Arduino core examples! It is highly optimized and includes face detection/recognition libraries.
// #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
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";
Once the upload is done:
http://192.168.1.150).Click “Start Stream” at the bottom of the web interface, and you will see live video from your new DIY surveillance camera!
http://<ESP32_IP_ADDRESS>:81/stream.