GoForSmoke:
The 1284P has 2 hardware serial ports. Is there any chance that you can use 1 to print a trace on a PC?
I've ended up using a pair of FTDI adapters, and connected their RX pins to the TX and RX pins on the 1284 so I can monitor comms between the it the SIM900 module. The serial string is different each time, as if sections are repeating. My original pastebin (========OUTPUT========Print 1e[0]=453768097,57,0,18,0,0,0,12.05,1,0,29.3 - Pastebin.com) shows it right at the top. I still don't understand why 3 Serial.print()'s one after another would print out something different. I tried removing the FTDI adapters to make sure that they were not affecting the output, but the SIM900 still sends a string different from what I would expect.
I can't use the other serial port as - annoyingly - Atmel decided to also use the pins for hardware interrupts, which I need to wake the device up from sleep when I want the lights on, or the bike moves; I would love to use the other port ![]()
I tried using software serial to debug the problem, but the program acted differently, I guess due to the additional time taken with the overhead of the SoftwareSerial library. Good ol' observer effect.