Hello to everyone
Can someone help me to write code for joystick?
I have arduino uno, and i need to map/code left and right key funtion to joystick.
I already made game in scratch that uses left and right arrow key.
It would be really cool if i could play it through arduino joystick.
Thanks in advance!
What kind of joystick?
What Arduino?
On an Uno (or the like) the ADC (Analog to Digital Converter) is 10 bit so the center on an analog joystick axis is 512(ish). Less than 512 (minus some hysteresis) could be left or down and greater than 512 (plus some hysteresis) could be right or up.
A search for "Arduino joystick tutorial" will get you lots more information.
1 Like
Joystick is Double Axis Button Rocke, and arduino is arduino Uno.
I will try that, thank you!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.