I have 2 Xbee Series2 modules, one set to Coordinator AT (Connected to PC with XCTU via USB dongle) and other set to Router AT(Connected to Arduino is connected to PC USB... RX>TX TX>RX and 5V GND)
http://continentalee.com.sg/xbee-adapter My xbee adapter
I have the programme uploaded into Arduino, a very simple sketch to test xbee wireless communication.
Code is here
char msg = ' '; //contains the message from arduino sender
const int led = 13; //led at pin 13
void setup() {
Serial.begin(9600);//Remember that the baud must be the same on both arduinos
pinMode(led,OUTPUT);
}
void loop() {
while(Serial.available() > 0) {
msg=(char) Serial.read();
if(msg=='H') {
digitalWrite(led,HIGH);
}
if(msg=='L') {
digitalWrite(led,LOW);
}
delay(1000);
}
}
The problem comes.
When I type "H" in the Serial Com, the led light up, and the letter "H" appears in the XCTU console.
however, when I type something into the XCTU console, nothing appears on my Serial monitor and no light is seen on arduino
Thank you for your help in advance.