Wi-Fi Access Point & real-time WebSocket web controller for an ESP32-C3 SuperMini RC car with a steering servo (strictly clamped to 50°–130°) and a 2-pin PWM/PWM generic H-bridge DC motor driver.
- Wi-Fi AP + Captive Portal: Broadcasts
ESP32-RC-Car(default password12345678) athttp://192.168.4.1/. - WASD + Touch + Analog Sliders:
- Keyboard:
W/S(throttle),A/D(steering),Space(emergency stop). Arrow keys are also supported. - On-screen multi-touch WASD buttons for phones/tablets.
- Analog throttle & steering sliders (auto-return to
0/90°on release by default).
- Keyboard:
- Steering Servo Limits (
50°–130°): Center is90°, clamped in hardware output to[50, 130]degrees. - 2-Pin PWM/PWM H-Bridge Control:
- Forward:
IN1 = PWM,IN2 = 0 - Reverse:
IN1 = 0,IN2 = PWM - Stop (
0input):IN1 = 0,IN2 = 0
- Forward:
- Motor Min/Max Speed Scaling:
0input always outputs0PWM (motor stopped).- Non-zero throttle (
1%..100%) scales linearly betweenmotorMinSpeedandmotorMaxSpeed.
- Direction Invert Toggles: Independent toggles to invert steering and motor polarity.
- Flash Persistence (NVS): All settings survive reboots via ESP32
Preferences. - Failsafe Watchdog: Automatically falls back to
0throttle and90°steering if no control heartbeat arrives withinfailsafeMs(default500 ms).
| ESP32-C3 Pin | Signal | Notes |
|---|---|---|
GPIO 3 |
Steering Servo PWM | 50 Hz RC servo signal (50°–130°) |
GPIO 4 |
H-Bridge IN1 (PWM) |
Forward speed PWM (0 when reversing/stopped) |
GPIO 5 |
H-Bridge IN2 (PWM) |
Reverse speed PWM (0 when forward/stopped) |
GPIO 8 |
Onboard Blue LED | Status indicator (active LOW) |
Power Note: Power the servo and motor from your battery/BEC (do not power motors from the ESP32-C3 3.3V pin), and connect a common GND between the battery, H-bridge, servo, and ESP32-C3 SuperMini.
Using PlatformIO:
pio run
pio run -t uploadCompiled firmware binaries (also attached to GitHub Releases):
firmware.bin— Application binary (flash at0x10000)bootloader.bin— Bootloader (flash at0x0)partitions.bin— Partition table (flash at0x8000)firmware-full.bin— Full merged image (bootloader + partitions + boot_app0 + app, flash at0x0)