Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation


🏎️ Gesture-Controlled Robotic Car with ESP-NOW

A wireless, gesture-controlled robotic car built with ESP8266 (NodeMCU) microcontrollers. The system uses a glove-mounted MPU6050 accelerometer to translate hand movements into driving commands via the low-latency ESP-NOW protocol.

The car is equipped with advanced safety features, including an ultrasonic collision-avoidance system, a variable-speed proximity alarm, and a targeting laser that activates when the vehicle is parked.

✨ Features

  • Gesture Steering: Control the car by tilting your hand (Forward, Reverse, Left, Right).
  • ESP-NOW Communication: Ultra-fast, Wi-Fi-less direct communication between the glove and the car.
  • Smart Collision Avoidance: An HC-SR04 ultrasonic sensor prevents the car from crashing into walls (auto-stops at <20cm).
  • Variable-Speed Parking Sensor: A buzzer beeps faster as you get closer to an obstacle (active between 60cm and 20cm).
  • Warning System: An LED flashes rapidly when in the "danger zone".

🛠️ Hardware Requirements

For the Glove (Transmitter):

  • 1x ESP8266 NodeMCU
  • 1x MPU6050 Accelerometer/Gyroscope Module
  • Portable Power Source (Power bank or battery pack)
  • A glove or wrist-strap

For the Car (Receiver):

  • 1x ESP8266 NodeMCU
  • 1x Robot Car Chassis Kit (with 2 or 4 DC Motors)
  • 1x Motor Driver (e.g., L298N or L293D)
  • 1x HC-SR04 Ultrasonic Sensor
  • 1x Active Buzzer
  • 1x LED (with 220Ω - 330Ω resistor)
  • Battery Pack (e.g., 2-cell LiPo or 4x AA for motors/microcontroller)

🔌 Wiring & Pinouts

🧤 The Glove (Transmitter)

Component Pin NodeMCU Pin
MPU6050 VCC 3.3V
GND GND
SCL D1
SDA D2

🚗 The Car (Receiver)

Component Pin NodeMCU Pin
Motor Driver IN1 (Left Fwd) D7
IN2 (Left Rev) D0
IN3 (Right Fwd) D5
IN4 (Right Rev) D6
HC-SR04 VCC VIN (Needs 5V)
GND GND
TRIG D1
ECHO D2
Buzzer Positive (+) D3
LED Anode (+) D8

(Note: Ensure the Car NodeMCU and the Motor Driver share a common Ground connection).


💻 Software Setup

Dependencies

You will need the Arduino IDE installed, along with the ESP8266 board definitions. You also need the following libraries:

  • ESP8266WiFi (Built-in)
  • espnow (Built-in)
  • Wire (Built-in)
  • MPU6050 (Install via Arduino Library Manager, usually by Electronic Cats or Jeff Rowberg)

1. Match the MAC Address

ESP-NOW requires the Transmitter to know the exact MAC address of the Receiver.

  1. Upload a basic MAC Address finder sketch to your Car NodeMCU.
  2. Open the Serial Monitor and copy the MAC address.
  3. Open the Transmitter-NodeMCU.ino code and update this line with your specific address:
    uint8_t carMAC[] = {0x78, 0x1C, 0x3C, 0x8A, 0x75, 0xC0};

2. Upload the Code

  • Connect the Glove NodeMCU and upload Transmitter-NodeMCU.ino.
  • Connect the Car NodeMCU and upload Receiver-NodeMCU.ino.

🚀 How to Drive

  1. Power on the Car, then power on the Glove.
  2. Hold your hand completely flat (horizontal). The car will remain stationary .
  3. Drive Forward: Tilt your hand forward.
  4. Reverse: Tilt your hand backward.
  5. Turn Left/Right: Roll your wrist to the left or right.
  6. Safety Override: If you drive forward into a wall, the buzzer will start beeping at 60cm. At 20cm, the car will automatically cut the forward engines, the LED will flash, and the buzzer will sound a solid tone. You must tilt your hand backward to reverse out of the danger zone.

About

iot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages