STM32F103ZET6 [Development of standard library functions] ------Joystick module JOYStick

The picture of the joystick module JOYStick is as follows:

1. The cross rocker is a two-way 10k resistor. With the direction of the rocker, the resistance of the tap changes.
2. This module uses 5v power supply. In the original state, the reading voltage in the x and y directions is about 2.5V. Turn the joystick, the voltage value will change accordingly, and the range is 0-5V. The z-axis direction is equivalent to a button.
Idea:
Use two ADC channels to read xy voltage and one I/O port to detect whether it is pressed

Guess you like

Origin blog.csdn.net/wsq_666/article/details/112647315