Communicate with 2 arduino uno card with a Xbee module placed on a relay shield.

Hello,

I can't make a communication between two arduino uno cards with a Xbee module placed on a relay shield. I want to turn on a led placed on pin 12 in this way:

I have no idea about how to make those cards communicate because a simple serial link don't work. I use this code to communicate thanks to wires and it works but not with XBee.

//Emmiter

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

void loop ( ) 
{ 
  Serial . print ( 'H' ) ; 
  delay ( 200 ) ; 
  Serial . print ( 'L' ) ; 
  delay ( 200 ) ; 
}
//Receiver

const int ledPin = 12;
int incomingByte;

void setup() {
  Serial . begin ( 9600 ) ;
  pinMode(ledPin, OUTPUT);
  
}

void loop() {
  if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == 'H') {
      digitalWrite(ledPin, HIGH);
      Serial . print ( 'H' ) ;
    } 
    if (incomingByte == 'L') {
      digitalWrite(ledPin, LOW);
      Serial . print ( 'L' ) ;
    }
  }
}

Thanks advance.

What kind of XBees are they? How have you configured them?

It's this XBee S2 http://ftp1.digi.com/support/documentation/90000976_G.pdf but I don't have configured them because I don't have XBee shield.

but I don't have configured them

So, you have one XBee named Nancy that can talk to Bob, and one named Ted that can talk to Alice, and you can't understand why they can't talk to each other.

but I don't have configured them because I don't have XBee shield.

Get a https://www.sparkfun.com/products/8687 instead.