Go Down

Topic: Xbee-Arduino Communication  (Read 257 times) previous topic - next topic


Hello, I am doing a small wireless project using two XBeeS2. Both the Xbee's i.e router and co-ordinator are connected to two arduino boards. The router part sends the analog values from those taken by the router arduino and sends it to co-ordinator. In the co-ordinator part I have bypassed the XBee by connecting reset pin of the arduino to ground and connecting TX(Xbee) to TX(arduino) and RX(XBee) to RX(arduino). I am able to get the serial as it is in the co-ordinator serial monitor of co-ordinator arduino but along with the serial i am getting strange characters like "%,#,!,~," etc. in front as well as at the end of the required string. How can I get rid of this strange characters and get the serial as it is on the co-ordinator side.

My Co-ordinator code:

void setup(){

void loop()
If(Serial.available() > 0);
Serial.print = Serial.read();

By using ths code I am able to get the router data as it is on the co-ordinator side but with that strange characters. Please help me in solving out this issue.

Thanks, in advance. :)


Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. I believe they are also relevant to XBee comms.

Two or three hours spent thinking and reading documentation solves most programming problems.


Your coordinator code hasn't a hope in hell of compiling, so it is NOT your coordinator code.

Try again. AND post your router code, too.
The art of getting good answers lies in asking good questions.

Go Up