Go Down

Topic: Unreadable Characters in Serial Monitor - XBee Pro issues (Read 1 time) previous topic - next topic

DibinDixit

Hello.
I'm having issues with XBee Pro S2B modem. One is connected to my PC with a Xbee USB dongle(http://www.rhydolabz.com/index.php?main_page=product_info&products_id=1093) and other connected to Arduino UNO with a Breakout board from Robosapiens. This would be the pin connection info. 
XBee Pin 2 => Arduino RX
XBee Pin 3 => Arduino TX

The problem is When i type some characters in X-CTU terminal, i receive data in Arduino Serial Monitor in a weird way(Unreadable Characters)..
When i type some characters, it gets divided my dots automatically and when it gets received in Serial monitor it appears Weird.
PC Xbee = ZIGBEE COORDINATOR AT
Arduino XBee = ZIGBEE ROUTER AT
Serial Baud: 9600

This would be the program to read data from PC
void setup() 
{

// set the data rate for the SoftwareSerial port
Serial.begin(9600);
Serial.println("Hello, world?");
}



void loop()                     // run over and over again
{

if (Serial.available())
{
     Serial.print((char)Serial.read());
}

}

PaulS

Instead of:
Code: [Select]
if (Serial.available())
{
     Serial.print((char)Serial.read());
}

Try:
Code: [Select]
if (Serial.available())
{
    char in = Serial.read();
    Serial.print(in);
}

DibinDixit

I've checked it, but i get the same problem again.. I've attached the Screenshot..

Go Up