UnoJoy and Serial Communication

It's a thumb joystick. It consists of 2 potentiometers and a pushbutton.
Pretty similar like this Thumb Joystick - COM-09032 - SparkFun Electronics

I connect the joystick to an arduino to its A0 pin for X axis and A1 pin for Y axis.
The readings from the Joystick are between 0 to 1023. This arduino acts as a remote control.

Then i transmit the data to the other arduino using xbees, both xbees are already configured to communicate at 38400 bps.
The speed for all serial comms are also set at 38400 bps.

I think the comms are okay since i can see the data transmitted from the remote control at the other arduino's serial monitor (which acts as a game controller).

I don't understand why this works when i put this in the loop section:
axisValue[0] = 0;
axisValue[1] = 255;
It reads OK in the game controller calibration screen. The "+" sign moves to the top-right of the calibration box. Of course nothing happens if i wiggle my joystick.
But when i use this:
axisValue[0] = map(xValue,0,1023,0,255);
axisValue[1] = map(yValue,0,1023,0,255);
The "+" sign doesn't move at all.

I know it's much easier to buy a wireless game controller. But hey, i'm just curious :smiley: