I am following this tutorial to learn about Arduino wireless communication. I have 2 Arduino unos with Xbee S1s sitting on Xbee Pro shields.
I've programmed the Xbee S1s by screening into the /dev/tty/* and configuring them with: +++, ATID1234, ATMY1000 (ATMY1001), ATDL1001 (ATDL1000)
and ATWR
. I've double checked the values to ensure they are correct.
So i've created a super simple Sender and Receiver package:
Sender.ino
int counter = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(counter++);
delay(1000);
}
Receiver.ino:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Looping");
while (Serial.available() == 0); // wait
int counter = Serial.parseInt();
Serial.println(counter);
Serial.flush();
delay(500);
}
So first of all, when I upload my program to my arduino, I make sure that the S1s are not attached to the Pro shields which is attached to the unos.
When both of my unos are powered, I see a red light blinking but no indication of "busy blinking" which is supposed to happen when two XBee S1s are connected to the same channel. I am currently seeing a consistent blinking at about 1 second frequency.
Can someone tell me why I am only able to see "Looping" in my Serial monitor on my receiver?
-
1So I was just hacking around and I finally figured out what went wrong! Apparently, there's a switch "XBEE/USB" that needs to be switched to XBEE for BOTH shields. After that, everything works as plannedblah– blah2014年06月17日 06:41:23 +00:00Commented Jun 17, 2014 at 6:41
-
1Please add that as an answer, and accept your own question, if you solved it.Werner Kvalem Vesterås– Werner Kvalem Vesterås2014年06月17日 07:09:31 +00:00Commented Jun 17, 2014 at 7:09
1 Answer 1
blah reported:
So I was just hacking around and I finally figured out what went wrong! Apparently, there's a switch "XBEE/USB" that needs to be switched to XBEE for BOTH shields. After that, everything works as planned.
Can someone vote this up please to remove it from the unanswered queue?