I have a problem making Seeduino stalker and Arduino Uno (could be also two Arduino Unos) communicate each other through XBee S1 Pro module. I have made the following setup:
- Configure two Xbee modules to communicate (UartSBee with X-CTU software).
Xbee S1 Pro -> Xbee shield V2.2 (Seeedstudio) -> Arduino UNO (Seeeduino-Stalker v3)-> pc -> x-ctu with this configuration :
The program in the arduino should have an empty Setup() method and an empty loop() method.
xbee shield V2.2 have this configuration :
- jumper between XB_TX and DIGITAL on the line 1
- jumper between XB_RX and DIGITAL on the line 0
The X-CTU configuration XBee 1 : PAN ID= 3333, DL=2384, MY=86. XBee 2: PAN ID= 3333, DL=86, MY=2384. Made this communication permanent by writing the setting to internal eeprom
Run X-CTU -> it detect xbee and I was will be able to use it through XCTU.
- Then, when I want to use my xbee with arduino IDE (in my case Arduino Uno and Seeduino stalker) . I Use UART software to Tx-Rx between Arduino UNO and Seeeduino Stalker with this wire configuration and Software code
- plug a jumper wire between xbee XB_TX (pin 11 on the Seeedstudio Xbee Shield V2.2) and arduino TX1 (1) and a jumper wire between xbee XB_RX (pin 10 on the Seeedstudio Xbee Shield V2.2) and arduino RX1 (0)
Then, I pushed to code to both arduino and Stalker. Its not working. Here the code
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10,11); // RX, TX
void setup()
{
pinMode(0, INPUT);
pinMode(1, OUTPUT);
mySerial.begin(9600); // the Bee baud rate
Serial.begin(9600); // the terminal baud rate
}
void loop()
{
if(Serial.available())
{
mySerial.print((unsigned char)Serial.read());
}
else if(mySerial.available())
{
Serial.print((unsigned char)mySerial.read());
}
}
Any help?