After playing around with different type of solutions to reset the arduino I have discovered an interesting behaviour. Below you will find a recording of how the device actually responds to being reset (I did post this on twitter but without detailed explanation). There are two methods I have investigated: the soft reset (watchdog) and the hard hack reset (a digital pin is connected to the actual reset pin on the board). Watch carefully what happens:
// Code for the soft reset wdt_enable(WDTO_15MS); // Code that does the hard reset digitalWrite(9, LOW);
You can hopefully clearly see that when I perform the soft reset via the browser the Arduino Uno just blinks here and there and it tells you that it has been reset... This however does not seem like a "proper" reset. I have tried to reboot the board this way in a situation when the ethernet shield somehow crashed and the watchdog was using the soft method. To keep it short it did not work as expected as I still could not connect to the IP of the arduino. Only real solution was to disconnect it from the power source and plug it back again. Now imagine that it is some kind of a project where your arduino is located in a really hard to access place...
The second method on the other hand is considered by some people as crude and / or an ugly hack. That could be the case. However if you take a proper look at the video you can clearly see that when it kicks in the entire board actually performs a full reset. This is great news for me (or anyone else) that is keen on running the platform 24/7. This could be some sort of home automation or IoT projects. Arduino has not been really designed to be on around the clock but there seems not to be much stopping you from doing so. It is for sure a cool thing to engage in and explore. I will probably be doing that some time soon after I finish with my marble run project which I find super fun at the moment. Final note: Make sure to use the hard hack method if you actually want something reliable.