Hello there!
I've been practicing and watching tutorials on how to work with the Arduino to make a joystick/gamepad game.
However, I decided to use a potentiometer and control the Y-axis using it.
The problem is that Arduino gets the right inputs, but when I check in the gaming controllers the crosshair is stuck in the upper left corner and won't move. The Y rotation does move.
I don't know much about Ardunio. I do know that every tutorial or code I have looked at has the map() line.
It simply gets the input of the potentiometer and set the maximum from 0-1023 and minimum from 0-255 (if I'm correct).
I'm just trying to control the Y axis using the potentiometer, but like I mentioned. In Serial Monitor I can see the values, which works correct, however, in the "Game Controllers" the crosshair is in the corner and won't move except for the bar value shown in the Y rotation.
I tried changing 255 to 180, but that didn't do anything.
As you can see, I made some adjustments and can now move the crosshair. However, the value when I rotate it doesn't change and the crosshair is set in the top middle not in the center.
Try to learn and understand what the code is doing. Importing new, unknown, code could be a never ending job.
Learn what data the libraries are made to handle, how they work.
Actually, I tested the potentiometer in a game online. It does works. It turns where it is supposed to. I just find it weird that it doesn't show the values in the "Game Controller" properties when I rotate it.