How tuancm24/remote_control_car_with_camera works
Project Type and Purpose
• The project is an IoT remote control car with a camera. Its purpose is to allow users to control a car via WiFi using a web interface while also streaming live video from an onboard camera.
• The README emphasizes skills in embedded programming (using ESP32/Arduino), real-time communication via WebSocket, and a user-friendly HTML/CSS/JavaScript front-end for controlling the car.
File Structure
• Top-Level Folders:
• "CarControl": Contains web assets in the “Web (1)” subfolder. This is the front-end for remote control.
• "Code_Xe_Adruino" and "Code_Xe_Adruino_Comment_Va_Pin_Ao": Arduino sketches (.ino files) that likely implement control logic for the car’s motors and sensors.
• "WebServer_Library": Contains third-party libraries (e.g., AsyncTCP and ESPAsyncWebServer) that are used by the embedded system to serve web pages and handle WebSocket communication.
• Other folders named "WiFi_Controlled_ESP8266_Based_RC_Car", "testCam", "test_encoder_v2", "test_module_INA219_do_thong_so_pin", etc.: These indicate experimental/test codes for various components (camera, encoders, sensor modules, etc.), highlighting the modular development and testing approach.
• Additional supporting materials such as presentation slides, reports, and documentation (e.g., “Kết nối Các chân GPIO trong ESP32 .docx” and “WifiManager cho ESP32.docx”) help understand the hardware connections and configuration.
• Architectural Implications:
• The project is split into a clear separation of concerns: the control interface (web front-end), the embedded control firmware (multiple Arduino/ESP32 sketches), and supporting libraries/documentation.
• The presence of test directories suggests that each sensor/actuator module (e.g., camera, INA219 sensor, distance sensor) has been developed and validated separately.
README for Additional Insights
• The README explains:
• The car is controlled over WiFi using a self-developed web interface.
• Live video streaming is implemented with the ESP32-CAM.
• Communication is realized via WebSocket for quick, efficient command transfer.
• There’s an emphasis on the integration between hardware and software, sensor data acquisition, and real-time command processing.
a. Main Components:
• Web Client (Front-end): Located in the "CarControl/Web (1)" directory, comprising HTML, CSS, and possibly JavaScript for the control dashboard.
• Embedded Firmware/Application Core: The .ino files in directories such as "Code_Xe_Adruino" and others, implementing control logic for motors, sensor readings, and interfacing with the web server.
• Networking & Communication Layer: Using the asynchronous web server libraries (AsyncTCP, ESPAsyncWebServer) in the “WebServer_Library” folder to handle WiFi communication (commands, sensor data, and video stream).
• Camera Module: Code found under "testCam" and possibly integrated within one of the firmware sketches to handle live video streaming.
• Sensor Modules: Code for distance sensors, encoders, and INA219 current measurement under various "test_*" directories.
• Hardware interfacing: Documentation files (e.g., pin connection guides) indicate hardware wiring between the ESP32/Arduino boards and physical components.
b. Relationships and Interactions:
• Sensor data (e.g., from distance sensors, current sensors, encoder) flowing from hardware components to the embedded firmware, which then sends updates to the Web Client.
• Use of the Asynchronous Web Service libraries as the communication backbone between the control logic and the network layers.
c. Architectural Patterns and Technologies:
• Use of asynchronous communication (non-blocking I/O via ESPAsyncWebServer) as an essential design pattern.
• Point out the integration of hardware-specific code (Arduino sketches) with network communications (WebSocket protocol for real-time updates).
• Mention modular design: Each testing folder represents a module for a specific functionality (camera, sensor data processing, etc.), showing an iterative development and testing approach.
d. Relevant Technologies and Frameworks:
• Hardware: ESP32/Arduino platforms, ESP32-CAM, various sensors (distance, encoder, INA219).
• Software: C++ (Arduino environment), AsyncTCP, ESPAsyncWebServer libraries.
• Front-end: HTML, CSS, JavaScript for the remote control UI.
• Communication: WiFi, WebSocket, and possibly HTTP for initial webpage delivery.