mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-09-26 00:50:23 +00:00
RC Robot Tutorial
This commit is contained in:
@@ -13,13 +13,14 @@ The following table summarizes GPIOs and pins reserved for operations purposes.
|
||||
|
||||
The GPIO numbers correspond to those on the ESP32-C3 WROOM microcontroller. The Pin number corresponds to the pin on the Breadboard and Power adapter development board.
|
||||
|
||||
x- and y- axis
|
||||
~~~~~~~~~~~~~~
|
||||
Reading the Joystick x- and y- axis
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The **GPIO0** and **GPIO1** assigned to measuring the voltage of x- and y- axis of the Joystick. Lastly, there is a group of GPIO pairs responsible for PWM for DC motors.
|
||||
To determine the position of the Joystick, the BitRider RC car uses ADC to measure voltage on two GPIOs connected to the joystic
|
||||
x- and y- axis potentionometers (**GPIO0** and **GPIO1**).
|
||||
|
||||
Direction and Speed
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Controlling the Direction and Speed
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The pairs of DC motors on the left side are wired to the dedicated PWM channels. This means that *ESP32-C3 Breadboard DevBoard* can control rotation speed and direction of DC motors in pairs only (i.e. left and right side).
|
||||
Consequently, only four PWM channels are sufficient for controlling the direction of the RC car.
|
||||
|
Reference in New Issue
Block a user