See 1st line of code. your 0x27 goes there.
Serial Monitor window is just fine for debug, but won't be available later when HP Controller is remote from your PC.
& if HP Controller hangs once in a while, when you power it off & connect to a PC then problem might not replicate in reasonable amount of time.
When I use to do Microcode & Power-On Self Test Diagnostic code for a living, I even added a circular Trace Buffer where code continuously traced it's path.
Every functions 1st line of code wrote it's ID into Trace Buffer & any other troublesome area like interrupt handlers.
Great aid for debug & intermittent errors.
And yes, computers, microprocessors, Arduinos, have intermittent errors.
Last edited by buffalobillpatrick; 08-18-14 at 01:57 PM..
|