How mattsroufe/esp32_rc_cars works
Main Components
a) Hardware Layer:
• ESP32-CAM module
• Motor & ESC (Electronic Speed Control)
• Servo
• Power Supply System (7.4V battery setup)
• Bluetooth Gamepad (PS4 controller)
b) Software Components:
• ESP32 Firmware
• Python WebSocket Server
• Web Interface
• Video Stream Processing Pipeline
[Web Browser Interface] -----> [Bluetooth Gamepad]
[Python WebSocket Server]
• Video Stream Processing
• Client Management
• Control Command Distribution
[ESP32-CAM]
• Camera Module
• Motor Control
• Servo Control
Data Flow Representation
• WebSocket communication (⟷): Bidirectional data flow
• Video stream (→): One-way data flow
• Control commands (⇢): One-way control signals
Detailed Component Breakdown
ESP32 FIRMWARE SECTION:
[Camera Module] → [Video Processing] → [WebSocket Client]
[Motor Control] ← [Command Handler] ← [WebSocket Client]
[Servo Control] ← [Command Handler] ← [WebSocket Client]
SERVER SECTION:
[WebSocket Server]
• ↓
[Video Stream Processor]
• ↓
[Client Manager]
• ↓
[Web Interface Generator]
Important Elements to Highlight
a) Communication Protocols:
• WebSocket connections (ws://)
• Wi-Fi connectivity
• Bluetooth control interface
b) Data Processing Points:
• Video frame processing
• Control command parsing
• Timeout handling mechanism
Technical Specifications to Note
• Motor control range (-255 to 255)
• Servo angle range (0 to 180)
• Video stream format
• WebSocket command structure
Implementation Details
• Relationship between .cpp and .h files
• Web_socket_server directory structure
• Static asset management