Sorry for the dumb question but... Today I received Xbee stuff for the first time, so I followed a tutorial to setup the whole thing. What I tried to do was letting an Arduino send a simple text to a XBee USB explorer so the PC could show the text with X-CTU. But nothing happened...
Tried lot's of things for hours, but in the end it turned out that my send string was the problem. When I replaced
Serial.println( "opatov..." );
with
Serial.println( "testing..." ); // from the original example code
It suddenly worked. Every time when I add that other line though, it stops working. Why? The string is just the first stupid word that came up in me, it has no meaning, except it's a metrostation in Prague I can remember. Ussually I would send "poop" or something. Ow, and Serial.println( "poop..." ); works by the way.
Did I per accident used a magic word or something? Is it maybe because the lettercombi "at" is inside the word? Ifso, how should I fix that in case I really want such a word to be sent? Never used AT commands or XBee in general.
Weird, really. For the info, I'm using an Arduino Duemilanove, XBee shield, and XBee Pro antenna (XBP24, firmware 10E6). The full code:
#define ledPin 13
byte pinState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
int k=0;
void loop() {
// Serial.println("testing..."); // WORKS
Serial.println("opatov..."); // DOES NOT WORK
// toggle an LED just so you see the thing's alive.
toggle(13);
delay(1000);
}
void toggle(int pinNum) {
// set the LED pin using the pinState variable:
digitalWrite(pinNum, pinState);
// if pinState = 0, set it to 1, and vice versa:
pinState = !pinState;
}
With the "faulty" string, the green LED on the receiver won't burn, I assume it doesn't even receive the message. The "Associate" LED on the shield just flashes quickly as ussual though. Also the TX LED on the Arduino flashes properly. I tried sending some other texts and numbers, and that just works.
Grasping at straws here but you might try restoring the defaults in your setup, although logically, if it works with "testiing..." it shoud work with "opatov..."