Hello everyone !
I am posting here out of desesperation , it's been days I'm looking for a solution to my problem and I'm afraid this forum might not be the one to post this thread, if so, I'm sorry.
I've tried contacting Seeedstudio, without success.
Otherwise, I'm going to write my problem and everything I've tried / done before coming here :
I'm starting a personal project : building a controller for an RC Car out of a Xbox360 controller.
I had no problem using a USB host shield etc for the controller , however , I'm struggling with the xbee modules.
I am trying to make a Arduino Mega equipped with a SeeedStudio XBee shield v2.2 (Xbee S1 Pro module plugged in) communicate with an Arduino UNO with the same shield and module.
I configured both XBee modules with XCTU correctly (Same PAN ID , same CH channel , MY Adress 1000 and 1001 resprectively , AP mode disabled , DH set to 0 , DL set to the other module MY adress).
I tested both modules with XCTU (Shield jumpers set to 0RX and 1TX for USB Serial communication) and they work properly (With a empty program uploaded in both Arduinos of course).
However , when I'm trying with the arduinos , nothing work as expected.
I wrote very simple programs for both arduinos :
Receptor :
#include <SoftwareSerial.h>
#define LED 13
SoftwareSerial xbee(2, 3);
void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(9600);
xbee.begin(9600);
}
void loop()
{
while (xbee.available() > 0)
{
digitalWrite(LED, HIGH);
xbee.read();
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
}
Emitter :
#include <SoftwareSerial.h>
#define LED 13
SoftwareSerial xbee(10, 11);
void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(9600);
xbee.begin(9600);
}
void loop()
{
if (millis() > 5000)
{
xbee.println("Hello world !");
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(2000);
}
}
But the receptor receive nothing , not even the red led on the shield indicating some data is being received lits up.
The code shown here uses SofwareSerial . I however tried with the Serial communication (pin 0 and 1) with the same results.
I normally use VS2013 and Visual Micro to code , but to exclude any interference possibility , I used the Arduino IDE.
This shield is also very poorly documented and there's no example code on SeeedStudio's wiki.
This is driving me really crazy , I'll appreciate any help.
Thanks for your time.