I am designing a wireless network with one coordinator and six routers.
Currently I am using Xbee communication with Zigbee AT mode with baudrate 57600.
I got corrupted data as follows:
First of all, The code above was used for multiple devices, the only difference was the identifier that is specific to each devices which is the 12, 07 or 08. So It doesn't really matter to write serial.print("08").
the following code was used to prevent the millis variable from overflowing. I was expecting the device will be operating beyond 32bit.
if (millis12 > 0)Serial.print((long)millis12);
Serial.print((long)(millis11 - millis12 * 1000000000));
That's the code that all I have. I simply use this device to transmit data to the receiver, and the read it from arduino serial port.
This problem only arises when multiple transmitting devices transmit data to only one receiver. Therefore, it seems that the data from one transmitter collide with another data from other transmitter when it tries to go get into the receiver, producing the result above. I believe the problem lays in the xbee radio configuration itself and not with the arduino code. Does anyone know how to configure xbee network properly for multiple nodes to one coordinator?