2025-06-19 5:38 AM
My project is a two-player Pong game using two joysticks, with each joystick controlling one paddle. The user interface was created using Touch GFX. The board is an STM32F429, and I have configured ADC1 to use channels 0 and 8. I’m using interrupts, but both paddles are currently being controlled by joystick 1, and joystick 2 has no effect. The adc_value1 and adc_value2 values read from the two joysticks via UART are identical.
Please help me correctly read the value from each joystick so that each paddle is controlled properly.
Thank you.
2025-06-19 7:54 AM
Hello @trungvan,
I recommend checking out the example provided at this link: BSP example for STM32F429ZI-Nucleo: This example shows how to use the joystick feature.
This example might offer useful insights and solutions for your application.
I hope my response has been helpful. If your question is resolved, please mark this topic as the solution, as it will assist others in finding the answer more quickly.
Thank you for your contribution.
Dor_RH
2025-06-19 7:58 AM
What joysticks?
JW
2025-06-19 8:29 AM
I am using two HW-504
2025-06-19 9:04 AM
show some code, attached your IOC file
2025-06-19 9:14 AM
So something like this:
https://www.aliexpress.com/item/1005008086523681.html
@trungvan wrote:The board is an STM32F429
That's just a chip part number - it doesn't identify what board you have.
The hardware is an essential part of the project - so you need to give full details.
See: How to write your question to maximize your chances to find a solution.