So been doing some research and finally got my joystick converted into a usb device. Most of it seems to be working but for some reason the analog data that comes in is so messy.
I recently acquired a CH Mach 3 joystick it uses 3 buttons and 2 potentiometers. Followed the tuts on how to set it up and well worked once "ish" and now its just all over the place. Buttons work fine. No idea what im supposed to do now.
The pushbutton switches are wired incorrectly. They will have undefined "floating" inputs when they are open. I hope the "tuts" didn't do it this way..
You need internal or external resistors with the switches. The easiest way, is to enable the internal pull up resistors using the INPUT_PULLUP option, connect the other end of the switches to ground instead of 5V, and invert the logic in the program to look for a LOW state with an active switch.
Look at the DigitalInputPullup example that ships with the Arduino IDE.
You haven't read the forum instructions. You need to post the code in line, inside a post, and using the code tags to format it.
Also, you left questions unanswered.
...and, according to the code that I found by following the link anyway, your switch wiring now needs to be modified, as explained in reply #6.
Another thing, we don't really have a description of the problem, other than "the data is messy" or "issues". Can you provide a more specific description of the potentiometer behaviour? Also, did your changes to the code change the pot behaviour?