{"id":24159179,"url":"https://github.com/rawfish69/esp32-rc-car","last_synced_at":"2025-08-02T07:38:58.932Z","repository":{"id":271316721,"uuid":"912848466","full_name":"RawFish69/ESP32-RC-Car","owner":"RawFish69","description":"Remote control car powered by ESP32","archived":false,"fork":false,"pushed_at":"2025-04-13T21:28:11.000Z","size":45620,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T20:47:00.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RawFish69.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-06T14:16:37.000Z","updated_at":"2025-06-02T12:47:36.000Z","dependencies_parsed_at":"2025-01-07T01:20:51.184Z","dependency_job_id":"8fdd5d9f-73e8-455d-b1d4-b732eb7f2570","html_url":"https://github.com/RawFish69/ESP32-RC-Car","commit_stats":null,"previous_names":["rawfish69/esp32-rc-car"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RawFish69/ESP32-RC-Car","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawFish69%2FESP32-RC-Car","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawFish69%2FESP32-RC-Car/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawFish69%2FESP32-RC-Car/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawFish69%2FESP32-RC-Car/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RawFish69","download_url":"https://codeload.github.com/RawFish69/ESP32-RC-Car/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawFish69%2FESP32-RC-Car/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348772,"owners_count":24236302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-12T15:15:14.220Z","updated_at":"2025-08-02T07:38:58.901Z","avatar_url":"https://github.com/RawFish69.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 RC Car\n\n[![Arduino](https://img.shields.io/badge/Arduino-IDE-00979D.svg?style=for-the-badge\u0026logo=Arduino\u0026logoColor=white)](https://www.arduino.cc/)\n[![ESP32](https://img.shields.io/badge/ESP32-C3-E7352C.svg?style=for-the-badge\u0026logo=espressif\u0026logoColor=white)](https://www.espressif.com/)\n[![ESP32](https://img.shields.io/badge/ESP32-any-000000.svg?style=for-the-badge\u0026logo=espressif\u0026logoColor=white)](https://www.espressif.com/en/products/modules/esp32)\n[![ESP-NOW](https://img.shields.io/badge/ESP--NOW-Protocol-green.svg?style=for-the-badge\u0026logo=espressif\u0026logoColor=white)](https://www.espressif.com/en/products/software/esp-now/overview)\n\n\u003e A browser-based RC car project powered by ESP32-C3, featuring real-time control through an intuitive web interface with virtual joystick controls. Available in both single-board and dual-board configurations.\n\n---\n\n## Features\n\n### Core Features\n- Dual operation modes: Default (2-wheel) and Omni (4-wheel) drive\n- Mode switching via hardware switch\n- Browser-based control interface with virtual joystick\n- Real-time motor control and status monitoring\n- ESP-NOW communication for reliable control\n- Emergency stop function\n- Individual wheel speed tuning\n\n### Communication Options\n- Single-board WiFi mode\n  - Direct WiFi AP connection\n  - Browser-based control\n  - Low latency for close range\n- Dual-board ESP-NOW mode\n  - Extended range (100m+)\n  - More reliable connection\n  - No WiFi network required\n  - Split control/drive functionality\n\n## Setup Guide\n\n### Option 1: Single ESP32 Setup (Simpler)\n1. Choose your desired mode and flash the corresponding code:\n   - For Default mode: Flash `default/default.ino`\n   - For Omni mode: Flash `omni/omni.ino`\n2. Wire motors according to pin configuration\n3. Power up the system\n4. Connect to WiFi AP \"Web RC Car\"\n5. Navigate to `192.168.1.101` in browser\n\n### Option 2: Dual ESP32 Setup (Advanced)\nRequires two ESP32 boards - one for control, one for the car.\n\n#### Controller Options:\nA. Basic Controller:\n   - Flash `control.ino` to controller ESP32\n   - Simple setup, fixed control mode\n\nB. Advanced Controller (with mode switching):\n   - Flash `master_control.ino` to controller ESP32\n   - Requires additional wiring:\n     * Mode switch to PIN 5\n     * OLED display (SDA: 3, SCL: 4)\n   - Allows real-time mode switching\n\n#### Car Setup (Required for both controller options):\n1. Flash `drive.ino` to car's ESP32\n2. Wire motors according to pin config\n3. Configure MAC addresses:\n   - Set receiving MAC in drive board\n   - Set corresponding MAC in controller\n\n#### Usage:\n1. Power up both boards\n2. Connect to controller's WiFi:\n   - Basic: \"Web RC Car\"\n   - Advanced: \"RC Default Mode\" or \"RC Omni Mode\"\n3. Navigate to `192.168.1.101`\n4. If using advanced controller, use switch to toggle modes\n\n### Mode Selection (Dual ESP Setup)\n- Default Mode (2-wheel): Switch LOW\n  - Standard differential steering\n  - Forward/reverse with turning\n- Omni Mode (4-wheel): Switch HIGH\n  - Full directional control\n  - Rotation while moving\n\n## Architecture\n\n### Single-Board Version\n```\n┌─────────────┐     ┌──────────────┐     ┌───────────┐\n│  Browser    │ WS  │   ESP32-C3   │ PWM │   Motors  │\n│  Interface  │◄───►│  Web Server  │────►│   Driver  │\n└─────────────┘     └──────────────┘     └───────────┘\n```\n\n### Dual-Board Version\n```\n┌─────────────┐     ┌──────────────┐     ┌──────────────┐     ┌───────────┐\n│  Browser    │ WS  │   Control    │     │    Drive     │ PWM │   Motors  │\n│  Interface  │◄───►│    Board     │◄───►│    Board     │────►│   Driver  │\n└─────────────┘     └──────────────┘     └──────────────┘     └───────────┘\n                          WiFi              ESP-NOW\n```\n\n### Component Overview\n\n1. **Web Interface** (`web_interface.cpp`)\n    - HTML/CSS layout\n    - JavaScript joystick controls\n    - WebSocket client\n    - Real-time status display\n    - UI event handling\n\n2. **Control Board** (`control.ino`)\n    - Web server hosting\n    - User interface handling\n    - ESP-NOW transmitter\n    - OLED display updates\n    - Connection management\n\n3. **Drive Board** (`drive.ino`)\n    - ESP-NOW receiver\n    - Motor control logic\n    - Failsafe handling\n    - Automatic reconnection\n    - Status monitoring\n\n### Communication Flow\n```\nBrowser (Web Interface) → WebSocket → Control Board → ESP-NOW → Drive Board → Motors\n```\n\n### Data Flow\n```\nUser Input → JSON Command → ESP-NOW Packet → Motor Signal → Physical Movement\n```\n\n## Master Controller\n\n\u003cimg src=\"docs/demo.gif\" width=\"100%\" alt=\"RC Car Demo\"\u003e\n\nThe file \u003ccode\u003emaster_control.ino\u003c/code\u003e manages both Omni and Default modes\nthrough ESP-NOW communication. Default mode now also supports direct\nESP-NOW control to the drive board.\n\n## Hardware Requirements\n\n- ESP32-C3-Mini development board\n- Dual H-Bridge motor driver\n- 2x / 4x DC motors with wheels \n- LiPo battery or AA batteries\n- Chassis (3D printed, Laser Cut parts, etc)\n- Basic electronic components\n- Soldering is optional\n\n## Vehicle Builds\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### Omni-Drive Version\n\u003cimg src=\"docs/omni_build.jpg\" alt=\"RC Car Omni Drive\"\u003e\n*4-wheel omni-directional drive configuration*\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### Standard Version\n\u003cimg src=\"docs/car.jpg\" alt=\"RC Car Default\"\u003e\n*2-wheel differential drive configuration*\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Pin Configuration\n\n### Default Version (2-Wheel Drive)\n| Pin | Function |\n|-----|----------|\n| 7   | Left Motor PWM |\n| 0   | Right Motor PWM |\n| 8   | Left Motor Forward |\n| 9   | Left Motor Reverse |\n| 4   | Right Motor Forward |\n| 3   | Right Motor Reverse |\n\n### Omni Version (4-Wheel Drive)\n| Motor          | Enable Pin (PWM) | Direction 1 | Direction 2 |\n|----------------|------------------|-------------|-------------|\n| Left Front     | 5               | 6           | 7           |\n| Right Front    | 20              | 21          | 3           |\n| Left Back      | 8               | 9           | 10          |\n| Right Back     | 2               | 1           | 0           |\n\n## Dual-Board Version\n\nAn alternative version using two ESP32 boards with ESP-NOW communication:\n\n### Features\n- Long-range control (hundreds of meters)\n- Direct peer-to-peer communication\n- No WiFi network required\n- Split control and drive functionality\n- More reliable communication\n\n### Components\n- Control Board: Handles web interface and user input\n- Drive Board: Controls motors and receives commands\n- ESP-NOW protocol for board-to-board communication\n\n### Benefits\n- Separation of concerns\n- Extended range capability\n- Reduced latency\n- More reliable motor control\n- Independent WiFi and control systems\n\nThe code for this version is in:\n- `control.ino`: Web interface and ESP-NOW transmitter\n- `drive.ino`: Motor control and ESP-NOW receiver\n\n## Web Interface\n\nThe interface includes:\n- Interactive joystick\n- Real-time wheel speed indicators\n- Quick control buttons\n- Fine-tuning controls\n- Status monitoring panel\n\n## Supporting Documentation\n\n### Design Files\n\u003cimg src=\"docs/chasis.png\" width=\"400\" alt=\"CAD Model\"\u003e\n*3D CAD model of chassis*\n\n### Control Display\n\u003cimg src=\"docs/control_oled.jpg\" width=\"300\" alt=\"OLED Display\"\u003e\n*OLED status display on control board*\n\n### Wiring Diagrams\n\u003cimg src=\"docs/omni_wiring.jpg\" width=\"400\" alt=\"Omni Circuit Schematic\"\u003e\n*Omni version wiring*\n\n\u003cimg src=\"docs/circuit.jpg\" width=\"400\" alt=\"Default Circuit Schematic\"\u003e\n*Default version wiring*\n\n## Technical Details\n\n### Motor Control\n- 10-bit PWM resolution (0-1023)\n- 50Hz PWM frequency\n- Minimum PWM threshold for reliable start\n- Individual wheel speed tuning\n- Proportional turn control\n\n### Network Configuration\n- AP Mode: `Web RC Car`\n- IP: 192.168.1.101\n- No password required\n- Optimized for low latency\n\n## Performance Tuning\n\n1. **Motor Dead Zone**: Adjust `MOTOR_MIN_PWM` if motors don't start smoothly\n2. **Turn Sensitivity**: Modify the turn rate mapping in the web interface\n3. **Wheel Balance**: Use the tuning sliders to compensate for motor differences\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawfish69%2Fesp32-rc-car","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawfish69%2Fesp32-rc-car","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawfish69%2Fesp32-rc-car/lists"}