Analog Thumb Stick Problems

Outline:

I'm trying to work with an Arduino and Analog thumb stick to get values for a simple differential drive robot I'm working on. The Keyes_Sjoys Arduino Joystick Module I have in my possession is giving me some strange numbers however.

Following axises Data I have:

• X-axis range of 0 to a shaky 470-520 with a center value of 40.
• Y-axis range of a solid 4 to solid 1023 with a center value of 605.

Problem

I haven't used analog sensors before but it seems pretty obvious that my X-axis ranges should feel somewhat similar to the Y-axis but they don't. In addition, the X-axis hits zero way way before even coming close to the edge for its operating range.

Is my sensor plain broke (it's new), or is there some way I can recalibrate the potentiometer?

void setup(){
Serial.begin(9600);
}
void loop(){

Serial.print("X = ");
Serial.print(X);
Serial.print(" Y = ");
Serial.println(Y);
delay(3);
}

• One way to test it would be to measure the resistance of each axis with a multimeter to isolate if it's the joystick or a potential code / ADC problem. I'd expect the axes should be relatively similar. – PeterJ Sep 1 '13 at 3:35
• How exactly have you wired the two together? – Dave Tweed Sep 1 '13 at 3:48
• Updated with code and wiring. – Monte Carlo Sep 1 '13 at 3:58
• Read on decoupling capacitors or refer to this post . – yazjack Mar 24 '17 at 12:16