I am trying to establish communication between xctu/xbee/arduino.I have 2 XBEE PRO S2C.In AT mode.First xbee connected to the pc via usb and the remote one connected to the arduino.
I can receive message from arduino but I can not send from xctu to arduino.(DH/DL values set properly in both xbee’s)
Here is my code
char letter;
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write(‘a’); //received by xctu
delay(400);
if(Serial.available())
{
letter=Serial.read();
Serial.print(letter);
}
else{
Serial.println(“Serial not available”);//Alwaysappears.
}
}
Thank you
First, run a range test on the two radios to the loop back cluster ID. This will verify that the two radios talk to each other.
Assuming that works, then remove the radios and just run jumper wires from the PC to the processor. Then use XCTU’s terminal to send data to the processor via the port. This will allow you to verify that your code works.