Hello. (I'm portuguese, I'm sorry for any gramatical or spelling mistake)
Basically, I'm asking for help because I can't make the Simple Example work...
Firstly, I'd like to say that I configured the XBee modules with the XBee Explorer (5 or 6 times actually). They have the same PAN ID and when powered, the Associate LED is blinking (End Device - 2/sec ; Coordinator - 1/sec).
I'm using two Arduinos, two Arduino Shields and two XBee Series 2.5 50mW (PRO).
I have the Coordinator AT attached to an Arduino with this code:
void setup()
{
digitalWrite(13, HIGH);
delay(3000);
digitalWrite(13, LOW);
Serial.begin(9600);
Serial.println('X');
delay(1000);
}
void loop()
{
Serial.print('H');
delay(1000);
Serial.print('L');
delay(1000);
}
And the Router/End Device AT in an Arduino with this code:
int outputPin = 13;
int val;
void setup()
{
Serial.begin(9600);
pinMode(outputPin, OUTPUT);
}
void loop()
{
if (Serial.available()) {
val = Serial.read();
if (val == 'H') {
digitalWrite(outputPin, HIGH);
}
if (val == 'L') {
digitalWrite(outputPin, LOW);
}
}
}
The Jumpers are on the XBee Position in both Shields.
The Associate LEDs keep blinking, but the 13Pin doesn't go HIGH on the End Device Arduino.
Am I missing something? Do you have some suggestions to make it work? Any help would be appreciated.