Hi,
I am building a standalone arduino (Uno) on one side that will send me information about input to another arduino (Mega). Both have an Xbee connected to Serial for the Uno and Serial1 for the Mega.
Both Xbee are Xbee Pro S1 and are on a simple shield, coming from there: http://www.droids.it/cmsvb4/content.php?143-990-001-XBee-Simple-Board.
I am sure that on both side I have Rx --> Tx and Tx --> Rx.
The communication works one way from the Mega to the Uno, but the Uno does not answer via the XBee, but when I have it on Serial USB it works perfectly.
I would like to know if someone have had the same problem I have, and how to solve it.
Thank you in advance.
Here is the test code I used to test it:
(UNO):
void setup() {
Serial.begin(9600);
}
void loop() {
char d;
while(Serial.available()) {
d = Serial.read();
Serial.print(d);
}
}
(MEGA):
char d;
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
Serial1.println("TEST");
while(Serial.available()) {
d = Serial.read();
Serial.print(d);
}
delay(1000);
}