+21622886281
Car ESP32 Project

Control a car equipped with ESP32 by computer via bluetooth

Objective of this project:

In this project we will build a car equipped with an ESP32 card and a hc-06 bluetooth module and controlled by the computer via bluetooth.

The user controls the car using the arrow keys on the keyboard (forward, right, left and back).

Components required

  • ESP32 card
  • L298N module
  • hc-06 bluetooth module
  • power supply module
  • connecting wires
  • car chassis

  • two wheels

  • two motors

  • roulette

  • 9V battery

  • une roulette
  • une batterie de 9V

Car assembly:

  • Connect pin N °5 of the ESP32 board to pin IN1 of the L298N module.

  • Connect pin N ° 4 of the ESP32 board to pin IN2 of the L298N module.

  • Connect pin No. 23 of the ESP32 board to pin IN3 of the L298N module.

  • Connect pin N ° 22 of the ESP32 board to pin IN4 of the L298N module.

  • Connect the GND pin of the ESP32 board to the GND pin of the L298N module.

  • Connect the VIN pin of the ESP32 board to the (+) terminal of the power supply module

  • Connect the GND pin of the ESP32 board to the (-) terminal of the power supply module

  • Connect the 12V pin of the L298N module to the (+) terminal of the power supply module

  • Connect the TX pin of the HC-06 module to the RX pin of the ESP32

  • Connect the RX pin of the HC-06 module to the TX pin of the ESP32

  • Connect the VCC pin of the HC-06 module to the (+) terminal of the power supply module

  • Connect the GND pin of the HC-06 module to the (-) terminal of the power supply module

Communication between the computer, HC-06 and the ESP32 card:

Micropython program for the ESP32 board

Here is the program which allows to connect the ESP32 card to the HC-06 bluetooth module and to receive a message containing the direction of direction of the car.

Copy the following code to the ESP32 boot.py file.

Copy the following code into an ESP32 file named dcmotor.py.

Python program executed in the computer:

This is the program that allows the computer to connect and send data to the HC-06 bluetooth module.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top