
The “I Built My Own RC Car” Moment
I still remember holding the joystick for the first time, pushing it forward, and watching the little robot chassis zoom across my room.
Not a toy from a store. Not a kit where everything just snaps together. Something I built. Wires, motors, ESP32s, code—all of it.
That feeling? It never gets old.
In this tutorial, I’m going to show you exactly how to build your own wireless ESP32 RC car using two ESP32 boards and a joystick module. One ESP32 acts as the transmitter (controller) , reading the joystick. The other is the receiver (car) , driving four DC motors. They talk to each other wirelessly using ESP-NOW—fast, simple, and perfect for beginners. That’s how you build your ESP32 RC Car.
What You’ll Build
| Component (Side) | What It Does |
|---|---|
| Controller (TX) | Reads joystick X/Y values, sends them wirelessly |
| Car (RX) | Receives commands, controls 4 motors for smooth driving |
| Communication | ESP-NOW protocol—low latency, direct connection |
The Flow:
You move joystick → ESP32 reads analog values → sends data wirelessly → second ESP32 receives → motor driver spins wheels → car moves | ESP32 RC CAR
Why Build This Instead of Buying a ESP32 RC Car?
| Reason | Why It Matters |
|---|---|
| Learn Wireless Comms | Understand how ESP-NOW or WiFi works for real projects |
| Customizable | Add FPV camera, sensors, stronger motors—your call |
| Cheaper | ~2500-3500 BDT total, vs. 5000+ for a comparable toy |
| Repairable | Something breaks? You know exactly how to fix it |
| Portfolio-Ready | A perfect project for engineering students and hobbyists |
For a BUET student budget? This is a no-brainer.
What You’ll Need (Complete Parts List)
For the Controller (Transmitter)
| Component | Specs / Notes | Approx Price (BDT) |
|---|---|---|
| ESP32 Development Board | Any version works (I used a standard 30-pin) | 600-800 |
| Joystick Module | XY axes + center push button (SW) | 80-150 |
| Breadboard | Small 170 or 400 points | 50-100 |
| Jumper Wires | Male-to-Female and Male-to-Male | 50-100 |
| USB Cable | For programming and power (optional battery later) | 100-200 |
For the ESP32 RC Car (Receiver)
| Component | Specs / Notes | Approx Price (BDT) |
|---|---|---|
| ESP32 Development Board | Second one, identical to the first | 600-800 |
| 4-Wheel Car Chassis | Includes a frame, 4 DC motors, and wheels | 800-1200 |
| Motor Driver Module | L298N (easy to wire) or L9110S (compact) | 350-550 |
| 18650 Batteries | 2x, for 7.4V power | 500-700 |
| Battery Holder | For 2x 18650 batteries | 100-200 |
| Jumper Wires | Male-to-Female, for motor driver connections | 50-100 |

Quick Buy Links (Affiliate)
| Component | Where to Find |
|---|---|
| ESP32 Development Board ×2 | AliExpress / Amazon |
| 4-Wheel Car Chassis | AliExpress / Amazon |
| L298N Motor Driver | AliExpress / Amazon |
| Joystick Module | AliExpress / Amazon |
| 18650 Batteries + Holder | AliExpress / Amazon |
Step 1: Wiring the Controller (Transmitter)
This part is simple. The joystick module has 5 pins:
GND → ESP32 GND
5V (or VCC) → ESP32 VIN (5V)
VRx (X-axis, analog) → ESP32 GPIO 34 (ADC)
VRy (Y-axis, analog) → ESP32 GPIO 35 (ADC)
SW (button, digital) → ESP32 GPIO 15

Step 2: Wiring the ESP32 RC Car (Receiver)
This is where the robot comes to life. The motor driver is the bridge between the ESP32 and the powerful motors.
L298N Motor Driver to ESP32 Connections
| L298N Terminal | Connects To (ESP32) | Notes |
|---|---|---|
| IN1 | GPIO 26 | Left Motor Direction |
| IN2 | GPIO 27 | Left Motor Direction |
| IN3 | GPIO 14 | Right Motor Direction |
| IN4 | GPIO 12 | Right Motor Direction |
| ENA | GPIO 25 | Left Motor Speed (PWM) |
| ENB | GPIO 33 | Right Motor Speed (PWM) |
| +5V | ESP32 VIN (optional) | Can power ESP32 if motors not too heavy |
| GND | ESP32 GND | Common ground—critical! |
L298N to Motors and Battery
| L298N Terminal | Connects To |
|---|---|
| OUT1 & OUT2 | Left-side motors (parallel) |
| OUT3 & OUT4 | Right-side motors (parallel) |
| 12V Input | Battery + (7.4V from 18650s) |
| GND | Battery – |

Step 3: The Code – How the Magic Happens
The code is split into two parts. Let’s break down the logic first.
The Controller Logic:
Read the analog values from VRx and VRy (0-4095).
Map these values to a joystick position (Forward, Backward, Left, Right, Stop).
Package this command into a simple data structure.
Send the data wirelessly using ESP-NOW to the car’s MAC address.
The Car Logic:
Listen for incoming ESP-NOW data packets.
Read the command (e.g., ‘F’ for Forward).
Based on the command, set the 4 motor driver pins (IN1-IN4) HIGH or LOW.
Use PWM on the ENA and ENB pins to control speed smoothly.
Upload This MAC Address Scanner Sketch
Connect the car ESP32 (receiver) to your computer via USB. Copy and paste this code into Arduino IDE and upload it:
Step 4: The Code – Controller (Transmitter)
This code runs on the ESP32 that has the joystick attached. It reads the joystick position and sends commands wirelessly to the car.
Copy and paste this code into your Arduino IDE. Upload it to the controller ESP32 (the one with the joystick).
Step 5: The Code – Receiver (Car)
This code runs on the ESP32 mounted on the car. It receives joystick commands and controls the motors via the L298N driver.
Copy and paste this code into your Arduino IDE. Upload it to the receiver ESP32 (the one on the car chassis).
What to Do After Uploading
1. Upload Controller Code:
Connect the controller ESP32 (with joystick) via USB
Select the correct board and port
Click Upload
2. Upload Receiver Code:
Disconnect the controller ESP32
Connect the car ESP32 via USB
Make sure you’ve updated the MAC address in the controller code first (if you haven’t, the car won’t receive anything yet)
Click Upload
3. Power and Test:
Power the ESP32 RC car with its 18650 batteries
Power the controller via USB power bank or its own battery
Push the joystick – your car should move!
Step 6: Upload and Test – The Moment of Truth
Program the Controller: Connect the first ESP32 to your computer. Select the correct board and port in Arduino IDE. Upload the
ESP32_RC_Car_Controllercode.Program the Car: Disconnect the first ESP32. Connect the second ESP32 to your computer. Important: You need to modify the code and put the MAC address of your controller ESP32 in the car’s code so they can pair. Upload the
ESP32_RC_Car_Receivercode.Power Up: Disconnect both ESP32s from USB. Power the car with its 18650 batteries. Power the controller via USB power bank or its own battery.
Drive! Push the joystick forward. Your ESP32 RC CAR should move!
Troubleshooting – Don’t Panic!
| Problem | Likely Cause | Fix |
|---|---|---|
| ESP32 RC Car doesn’t move | Battery not connected or insufficient voltage | Check 18650 voltage (should be >6V). Recharge batteries. |
| Car moves erratically | Common ground missing between ESP32 and L298N | Connect a GND pin from ESP32 to the GND terminal on the L298N. |
| One side doesn’t turn | L298N connection issue | Check IN1-IN4 and OUT1-OUT4 wiring. Swap motor wires to test. |
| No wireless connection | MAC address incorrect | Get the correct MAC address of your controller ESP32 (use a scanner sketch) and put it in the receiver’s code. |
| Joystick axes swapped | Wiring mismatch | Swap the VRx and VRy pins on the controller’s ESP32, or swap X/Y in the code. |
Level Up: What’s Next?
You’ve built the foundation. Now, make it yours.
| Upgrade | What You’ll Need |
|---|---|
| FPV Camera | ESP32-CAM module – stream video to your phone |
| Obstacle Avoidance | Ultrasonic (HC-SR04) sensor – make it drive itself |
| Speed Control | Use the joystick’s analog values for proportional speed, not just on/off |
| Better Power | 2S LiPo battery (7.4V) with higher discharge rate for more punch |
| Custom Controller | Build the controller into a 3D-printed box with a proper joystick knob |
| Follow Me Mode | Use a smartphone’s GPS/compass data sent to the ESP32 RC car |
Cost Breakdown (Bangladesh)
| Component | Approx Price (USD) |
|---|---|
| ESP32 ×2 | $10.00 – $13.50 |
| 4WD Chassis with Motors | $6.70 – $10.00 |
| L298N Motor Driver | $2.90 – $4.60 |
| Joystick Module | $0.70 – $1.25 |
| 18650 Batteries (2x) + Holder | $5.00 – $7.50 |
| Breadboard & Jumpers | $1.25 – $2.10 |
| Total | ~$26.50 – $38.75 |
For a fully functional, custom-built ESP32 RC car? That’s incredible value.
Final Thoughts
This project taught me something important: wireless control is not magic. It’s just two microcontrollers agreeing on a language and a few GPIO pins firing in the right sequence.
Is it perfect? No.
The turning could be sharper.
The range could be longer.
I’d love a nicer case for the controller.
But it’s mine. I built it. I understand how it works. And when something goes wrong, I know how to fix it.
That’s what Roborear is about. Not just copying tutorials – understanding them, improving them, making them your own.
Your Turn
Got the ESP32 RC car working? Modified it with an FPV camera or sensors? Stuck on a step? Drop a comment below – I read all of them.
And if you want to see this project in action, check out the video on YouTube.
FAQs
Affiliate Disclosure
Some links in this post are affiliate links. If you purchase through them, I may earn a small commission at no extra cost to you. This helps support Roborear. Thanks!


