I have an arduino connected to a few sensors (accelerometer, magnetic sensor) as well as a switch and a potentiometer. This is connected to an Xbee configured for API mode with escape characters. To send packets from the Arduino to the xbee, I'm using Andrew Rapp's code library.
There is a receiver xbee connected to my pc which is communicating with flash via serialProxy.
Now I'm facing a problem that seems to occur at all baud rates. I switch the arduino on and it seems to be working fine, but if i send any data to it from the computer, it resets within a few seconds. Can you guys tell me why this is happening?!
I have a suspicion it has something to do with the available RAM, but i dont know how to confirm this =/
Make sure that whatever program on the PC is sending the data, is not also toggling the DTR pin. (Some programs use DTR for handshaking).
I haven't checked you code but I had a similar problem when I was writing the characters for the serial port into and array for processing. I was mistakenly writing off the end of the array, which caused a reboot each time data came in.