Hi All,
I've been trying to get this working for a while now. I've been reading the Building Wireless networks book and have got the two Xbees working via X-CTU. So I know they are configured properly and are talking via that protocol .
When I hook them up to my Arduinos though I can't seem to get it working as expected. I can see via the Xbee leds that they are communicating / associated but when listening to the serial port I don't receive anything. I put a simple test to turn on a LED when receiving some data and no luck . I've tried a heap of different code with no luck.
I have put a few youtube vids of the setup.
I'm using:
1x Seeduino Stalker (Xbee Co-ordinator AT)
1x EtherTen Arduino with relay shield and Sparkfun Xbee Sheild (Xbee Router AT)
I have tried with just without the relay shield and no love.
I know the Seeduino is sending via serial because I have tested via X-UTU as shown in the youtube vid. When I hook upto the 2nd Arduino I'm no getting it.
I feel / hope I'm missing something really simple.
Using this in the loop to catch the incoming data
Code:
void setup()
{
pinMode(5, OUTPUT);
Serial.begin(9600);
}
if (Serial.available() > 0) {
digitalWrite(5, HIGH);
delay(2000);
digitalWrite(5, LOW);
}
Baudrate on the Seeduino is also 9600.
I also tried using:
#include <SoftwareSerial.h>
uint8_t pinRx = 2, pinTx = 3;
SoftwareSerial mySerial(pinRx, pinTx);
if (mySerial.available())
{
char gotChar = mySerial.read();
Serial.print(gotChar);
digitalWrite(5, HIGH);
delay(2000);
digitalWrite(5, LOW);
}
no love :\