I have a program I have written which reads some data from sensors, goes to sleep and then repeats.
I have had it running fine for over 12 hours when the USB cable is connected to my laptop however I am unable to keep the program running for more than 2 cycles (10 min) without it crashing!!
Not easy to debug
At the moment the only thing I can think of is that it has something to do with when I put everything to sleep however I dont understand why this would be different when connected to USB versus battery power.
Anyone have any thoughts ?