Skip to content

nostromo-1/robotic-car-ESP32

Repository files navigation

robotic-car-ESP32

Project of a robotic car with an ESP32 as control unit. It is equivalent to the Raspberry Pi version.

This project is about building a hobby robotic car. It is a 4WD or 2WD car, with a ESP32 as MCU, and controlled by a wiimote. It needs some external electronics. Communication with the robot is achieved via bluetooth (the wiimote).

Features

  • 4WD or 2WD robotic car (depending on chasis)
  • It can operate under the control of a Wiimote or in autonomous mode
  • The Wiimote can be used to:
    • Move forward (A button) or backward (B button)
    • Turn right (RIGHT button) or left (LEFT button)
    • Increase ('+' button) or decrease speed ('-' button). Speed is signalled in the leds of the Wiimote
    • Activate a buzzer sound (DOWN button)
    • Play a police siren (UP button) over a loudspeaker. If you push again the UP button while still playing, it stops playing
  • It can detect collisions via the inertial measurement unit. If it crashes, it tries to avoid the obstacle. NOT YET IMPLEMENTED
  • It continuously monitors distance to an obstacle in the front side. If an obstacle is near, it will drive around it by turning until no obstacle is found. If it detects a stall (like in undetected obstacles, due to a non straight position with respect to the sonar), it will move a little backwards and turn to avoid it
  • It monitors battery voltage and current consumption and shows them in the display, also showing a battery status symbol in the display. If battery is too low, it powers off
  • If the scan button is pressed, it starts scanning for wiimotes and connects to one.
  • It displays status messages in a display. It also shows its orientation (roll, pitch and yaw angles).
  • It features a KARR-type scanner :-)

Parts

The following parts are needed to build it:

Software

The robot is programmed in C using the Espressif environment (not Arduino). It is tested on the Espressif v5.1 version. Please refer to the installation instructions.

After installing the environment and copying the source files, run idf.py build followed by idf.py flash.

Operation

Switch on power on the car. The text "Scan..." will appear on the display. Then, press buttons '1' and '2' on the wiimote. The car will find the wiimote and attach to it.

Now, you can control the car: press 'A' to move forward.