Gotta love SEARCH! I needed a way to restart my sketch if a condition was met.
calle_o 's solution worked GREAT for my application. I inserted this code at the end of my sketch:
asm volatile (" jmp 0");
Then, at the point in my sketch I wanted to have the reset happen, I added the code:
Hope this helps others seeking the same result.
Others that have done it that way have reported that it's not a true reset in that the hardware peripherals are not put into their default condition.
I am enough of a noob that I dont fully understand what that means! :-? I *think* all my hardware peripherals (pushbuttons, serial 4-digit display,MAX6675 thermocouple board and 24LC256) wont need a reset. The 'softReset' is called after I overwrite the 24LC256 memory with zeros to prepare it for the next test.
But it seems to work in my application so far... I will post back if any problems occur.