I have a sketch that will run for hours and then just stop. Doesn't respond to outside stimulus -- even the reset button is ignored. I have to power cycle the board to recover. So I tried the watchdog timer function.
I disable it at the beginning of setup(), and then enable it at the end. Then I call the reset every second in the loop.
Last night it again hung and I had to power cycle the board to recover. To be clear there may are two problems:
Why is it hanging?
When it hangs, why doesn't it respond to a reset?
Frankly of the two, the second is the bigger issue because it points to something at a very fundamental level not working as advertised. Anybody have any ideas as to why something as basic as the reset button wouldn't work?
(I have tested the reset button when the code is running normally, and it works fine.)
Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE
Can I suggest that you post your sketch, using code tags when you do. It would surely be better to discover the root cause of the problem and fix it, rather than applying a sticking plaster
One thing that will prevent a reset is if your power supply has shutdown on overload; to diagnose, the Arduino probably has a power LED - is it still on? Do you have a multimeter, to measure the voltage between 5V and GND? What other devices are attached, and how are they powered?
Back to the "pride of lions", now.
Hi,
if your arduino is being powered through the internal regulator of your board,
there is a possibility of over current and the regulator to the
heat stops supplying correct voltage to your system.