Joystick With ESP32

by jorgeeldis in Circuits > Microcontrollers

1553 Views, 4 Favorites, 0 Comments

Joystick With ESP32

image011.png

In this project we will see the step by step of our code and its operation, the function of this program is to obtain the values of the joystick by changing its position in X, Y, Z, in this case the conversions from ADC to Voltage to DAC will be used for the full operation. This code will be achieved thanks to previous theoretical classes, where we touch on GPIO issues and using the PlatformIO platform.

Supplies

Joystick Module for ESP32

ESP32 Microcontroller

Jumper Cables

Circuit Design

First we make the circuit for our project:


Coding & Testing

Step 2.1

First we will do the procedure of creating the new project by the platform PlatformIO. After creating this project, we remember to put the speed of the card in the file configuration, which is about 115200.


Step 2.2

We start by creating the code, applying the necessary libraries so that our code can work:


Step 2.3

We define our input and output of the circuit, the specifications are sought to know Which ESP32 leg matches the ADC and DAC channels:


Step 2.4

We add some variables where we are gonna get results on serial monitor:


Step 2.5

The function is created for the Inputs and Outputs to work:


Step 2.6

Next, the logic of our circuit and some test images where you can see that it was achieved successfully the experience: