I've got a sketch that uses the official ethernet shield to grab some data from the internet, parse some data from that, and occasionally forward it to another device via a (new software) serial port. It's not high throughput or anything. At very irregular intervals, it will lock up. I can tell this by virtue of the serial device showing old data. Sometimes it will work properly for an hour, and sometimes it will work for more than a day. But it just doesn't work properly.
I'm looking for some ideas for troubleshooting. I confess that I am spoiled by debugging on a PC where I can attach to a process with a debugger and see what's what. I know the usual technique here is to output strings to the serial port, but I don't really want to have a computer attached to the device for such long periods. Also, the sketch is definitely pushing the limits of RAM, although it doesn't seem to "go over the edge" and reboot (it used to, but I reduced its footprint some).
One thought I had was to sprinkle some other form of output through the code. I am sure I can find a max of 16 interesting spots in the code, and was thinking of hooking up a seven segment display to show a single hex digit. I began to research such things, and got a bit overwhelmed. So, I guess I have 3 thoughts at this point:
perhaps someone can point me to a good tutorial on hooking up a 7-segment display via some form of driver IC where I can somehow send it the data and have it display. I don't really want to tie up 7 pins. Also, most drivers seem to be BCD, and I would really prefer hex. I think this should be cheap, but some hex drivers I've found are old and expensive. In my little imaginary world, I should be able to buy a $.95 digit, a $1.50 driver IC, and find a really tight library and go. I haven't found those pieces yet.
I could just hook up 4 LED's and figure out how to drive them to represent a count.
Maybe someone else has some other good ideas for very lightweight debugging aids.
Thanks for any assistance!