Help needed using a small joystick to move mouse pointer

I'm using this small joystick: http://www.amazon.com/Thumb-Joystick-Module-Arduino-Black/dp/B00CP0TMU2/ref=sr_1_1?ie=UTF8&qid=1448263500&sr=8-1&keywords=arduino+joysticks

I'm starting out just trying to move the stick and read the values in the serial window...so the code is pretty simple right now.

The serial window displays 1023x1023 all the time! It never changes even when I move the joystick around.

What am I forgetting to do?

Thanks...

const int joystickYpin = 14; // analog A0
const int joystickXpin = 15; // analog A1

int mouseX = 0;
int mouseY = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(joystickYpin, INPUT);
  pinMode(joystickXpin, INPUT);
}

void loop()
{
  mouseX = analogRead(joystickXpin); // will be 0-1023
  mouseY = analogRead(joystickYpin); // will be 0-1023
  Serial.print(mouseX);
  Serial.print("x");
  Serial.println(mouseY);
  delay(250);
}

Check the ground (GND) connection between your Arduino and your joystick.

If you have a meter, check the two voltages from the joystick are about 2.5V when the joystick is central.

Do you have an Arduino Mega? - Only Mega has analog inputs up to pin 15, most others only 0-7.

Try changing the pin definitions to use the analogue name/number and not the digital number.

const int joystickYpin = A0; // analog A0