Skip to content

This project implements a high-performance ESP32-CAM-based remote control and live video streaming system. It is designed as a flexible base for any ESP32-CAM project, allowing easy expansion and customization for different applications.

License

Notifications You must be signed in to change notification settings

SuprovoRGB/ESP32-CAM_Remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-CAM_Remote

ESP32-CAM_Remote - Image

Platform Framework RTOS Domain Status License

ESP32-CAM - AI Thinker

Development Setup

  • IDE: Arduino IDE v2.3.7
  • Boards Manager: esp32 by Espressif Systems v3.3.5
  • Board: AI Thinker ESP32-CAM
  • CPU Frequency: 240MHz (WiFi/BT)
  • Core Debug Level: None
  • Erase All Flash Before Sketch Upload: Disabled
  • Flash Frequency: 80MHz
  • Flash Mode: QIO
  • Partition Scheme: Huge APP (3MB No OTA/1MB SPIFFS)
  • Camera: OV2640
  • SD Card: MicroSD / MicroSDHC (FAT32)
  • Programmer Module: ESP32-CAM-MB (Recommended)

Project Overview

This project implements a high-performance ESP32-CAM-based remote control and live video streaming system. It is designed as a flexible base for any ESP32-CAM project, allowing easy expansion and customization for different applications. The entire firmware is written in a single file with structured sections and guided comments for educational and learning purposes.

  • The code demonstrates the following
    • Proper ESP32 + FreeRTOS usage (Core0 for system tasks and Core1 for user tasks)
    • Non-blocking MJPEG video streaming
    • SD card photo capture from live stream
    • Single-client web interface locking
    • Reliable Wi-Fi auto reconnect logic

Features

  • Single-file object-oriented source code with guided comments (beginner-friendly and educational)
  • High-performance, stable MJPEG video streaming with FPS display (performance depends on Wi-Fi and quality settings)
    • QVGA: Up to ~50 FPS
    • VGA: Up to ~25 FPS
    • Adjustable resolution and JPEG quality with image rotation
    • Real-time FPS display on the top-left corner of the remote UI
  • ESP32-CAM can operate as a remote device even if the OV2640 camera is not connected
  • SD Card support using 1-bit mode (MicroSD / MicroSDHC, FAT32)
    • Saves GPIO pins
    • Firmware runs normally even without an SD card
  • Photo capture from live stream
    • Capture via the UI and save directly to the SD card
    • On-board LED remains ON during capture
  • Free usable GPIO pins
    • Always free: GPIO 1, 3, 12, 13, 16
    • Additionally free: GPIO 2, 14, 15 (when SD card is not inserted)
  • Wi-Fi behavior
    • Device waits until first successful Wi-Fi connection
    • Automatic Wi-Fi reconnection
    • On-board LED blinks at ~2 Hz during connect or reconnect attempts
  • Clean, responsive, and lightweight web-based remote UI
    • Directional buttons support press-and-hold operation
    • Flash LED control via UI
  • Single-client access enforcement
    • If UI is opened on one device, other devices are blocked with a message
    • If connection is lost for 30 seconds, a new device is allowed to connect
  • Bluetooth disabled by default to improve Wi-Fi stability and performance

Instructions

  1. Open this code in the Arduino IDE on a PC
  2. Install the appropriate ESP32 Boards Manager if it is not already installed
  3. Modify the code as needed and update the Wi-Fi SSID and password (router credentials) in the setup() function
  4. Connect the ESP32-CAM to the PC
  5. Select the correct Board and Port, and verify all required settings in the Tools menu
  6. Open the Serial Monitor and set the baud rate to 115200
  7. Upload the firmware to the ESP32-CAM
  8. Wait until the on-board LED stops blinking (Wi-Fi connected)
  9. Note the assigned Wi-Fi IP address shown in the Serial Monitor (if not shown, perform an ESP32-CAM hardware reset and wait)
  10. Disconnect the ESP32-CAM from the PC and power it in your project
  11. Wait until the on-board LED stops blinking again (Wi-Fi connected)
  12. Enter the ESP32-CAM IP address in a web browser (mobile device recommended) connected to the same router
  13. The remote UI will open and can be used to control the ESP32-CAM
  14. If the UI does not open, reconnect the ESP32-CAM to the PC and recheck the IP address
  15. For any other issues, please recheck the code and project circuit (mentioned in the Caution section)

Caution

  • Provide a stable power supply of 5V and at least 500 mA to avoid power issues and brownouts
  • Boot-sensitive GPIOs must be handled carefully
    • GPIO 0 must be HIGH during boot and LOW during sketch upload
    • GPIO 2 and 12 must be LOW during boot
    • GPIO 15 must be HIGH during boot
  • Serial output is disabled by default after the initial status print to free GPIO 1 and 3
    • Any further Serial usage must be handled carefully
  • The OV2640 camera and SD card should not be inserted or removed while the ESP32-CAM is powered on
  • Power off the ESP32-CAM only when it is NOT writing to the SD card

About

This project implements a high-performance ESP32-CAM-based remote control and live video streaming system. It is designed as a flexible base for any ESP32-CAM project, allowing easy expansion and customization for different applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages