I saw that in another thread, and did connect the grounds together, with no luck. Same result.
Should I try SoftwareSerial?
If you can't send data via the hardware serial port, what makes you think you will be successful using two other pins?
is there a way to make SoftwareSerial work with the Xbees?
Yes, but what does that have to do with your problem of not being able to send data without the XBees?
I feel like i'm missing something fundamental, and my trying SoftwareSerial, i'm starting from scratch in a different direction.
So I started from scratch, with this on one Arduino:
int LED = 13;
int incomingByte;
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
}
void loop() {
if (Serial.available() > 0) {
incomingByte = Serial.read();
if (incomingByte == 'H') {
digitalWrite(LED, HIGH);
}
if (incomingByte == 'L') {
digitalWrite(LED, LOW);
}
}
}
And this on another:
int LED = 13;
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
}
void loop()
{
Serial.print('H');
digitalWrite(LED, HIGH);
delay(1000);
Serial.print('L');
digitalWrite(LED, LOW);
delay(1000);
}
And I can now get them to flash their LEDs! So I have progress. I attached the Xbees and powered them back on, but could not get the LEDs to flash in sync. I tried connecting grounds together with the Xbee shields attached and that didn't work. I removed the Xbees, re-attached the serial wires, and it started working again.
I'm going to re-program the Xbee modules again and see what happens.