I have problem with my lately-arrived Arduino XBee Shields (v1.1). Attaching each of my two XBee Shields (v1.1) to an Arduino Diecimila board, I failed to run the 'Simple Example' retrieved from the following URL: http://www.arduino.cc/en/Guide/ArduinoXbeeShield
Basically what I did is as follows:
-
The 'Simple Example' claims "You should be able to get two Arduino boards with Xbee shields talking to each other without any configuration", so I leave the Xbee shields unconfigured;
-
I followed the instructions by uploading Communication | Physical Pixel sketch via COM3 to the 1st board, and it works;
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);
}
}
}
and after finishing uploading I switch the jumpers of the 1st XBee shield from USB to Xbee setting.
- I switched to COM4 to upload the following code provided in the 'Simple Example' to the 2nd board:
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print('H');
delay(1000);
Serial.print('L');
delay(1000);
}
It also works with the 2nd board.
- Finally I also switched the jumpers of the 2nd XBee shield from USB to Xbee setting. But that "you should see the LED on the first board turn on and off, once a second" never happens.
Has anyone tried the same sample, and encountered similar problem with me? Any hint on what my problem might be, such as that I did not follow the step in the 'Simple Example' strictly, or that I should have configured the XBee shield before attaching it to the board?
Any help is much appreciated.