strange bug printing data from xbee packet

Hi,

usb is an instance of SoftwareSerial (from arduino 1.0.1 - i.e. based on NewSoftSerial). The code I have working now is attached to this post. This is different from what I was posting before because I've done some more work this afternoon. xbee_beacon_transmitter.pde is on the coordinator, which is sending out regular (4 second) ticks to the device running xbee_beacon_receiver.pde. The receiver sends back log packets, which is the bit I was stuck on.

The idea of the code is for the receiver to sync its own clock as closely as possible to the clock on the transmitter, in period and phase. This part isn't working fully yet, but at least I can now debug it. The code which sends the heartbeat and log packets is now working fine as far as I can see.

cheers. :slight_smile:

xbee_beacon_transmitter.pde (7.44 KB)

xbee_beacon_receiver.pde (9.64 KB)