Using Joystick with ESP32

Hi community! Today's project is gonna be about how to use a joystick with the ESP32!

Hi Community!

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.

Step 1

First we make the circuit for our project:

Step 2

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 3

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

Step 4

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 5

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

Step 6

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

Step 7

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