Help in Xbee??

I need helping in xbee, i made a simple project led and potentiometer using xbee (wireless) "the potentiometer controls the intensity of light of the led" , but it doesn't work>>
Can anyone tell me if the code is right or what??

// Sample code for sending potentiometer values

int val;
int new_val;

void setup()
{
// start serial port at 19200 bps
Serial.begin(19200);
}

void loop()
{
// read analog input
val = analogRead(0);

// remap values
new_val = map(val, 0, 1023, 253, 0); 

Serial.write(254);     //SYNC char
Serial.write(new_val);
delay(150);
}
// RECIEVER
byte incomingByte,pot;

void setup() {

// start serial port at 19200 bps
Serial.begin(19200);

pinMode (5, OUTPUT);  // set led pin 5 to output
delay(100);
}

void loop() {

 if (Serial.available()) {   // is there any information available on serial port ?
incomingByte = Serial.read(); // assign bytes to the variable ‘incomingByte’
Serial.print(int(incomingByte));

if ((int(incomingByte) == 252)) {
pot = Serial.read();
Serial.print("Pot = ");
Serial.print(int(pot)); //print the values of pot on serial monitor
}
}
analogWrite (5, pot); //pwm led according to pot values
}

How are we supposed to help if you don't tell us what doesn't work?

The Potentiometer in serial monitor >> work , but the led doesn't work!!!
and i made a connection between to xbees and work (TX and RX) by using XCTU program.