Serial communication problem with XBee and Nano


i used 2 xbee 2 uartsbee perform wireless comm between arduino nano , pc. pc connected 1 xbee via uartsbee's usb. arduino nano powered on-board usb, , output v3.3 powers other uartsbee , xbee (i tried way nano powered battery, same problem existed).

i try print number "2" on x-ctu terminal tab on pc test. code simple:

int out = 2;
void setup() {               
  serial.begin(9600); 
}

void loop() {
serial.print(out);
serial.print("\n");   
delay (2000);
};

the output on x-ctu ...........2......2.....222.....2.....2....................

if use println() instead in loop, output ..:...:...:..:...:1:...:..:....:.:...1:..:..:...:....1:..:

i thought because of wrong baud rates of xbee. checked baud, both set 9600.

also if replace nano arduino fio.  number "2" printed right. print("\n") still wrong.

any appreciated!

what happens if use serial monitor, instead?


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Serial communication problem with XBee and Nano


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial