Arduino Serial Port Reset
Sometimes it can be useful if the Arduino UNO could reboot itself without having to push the reset button on the board. There are at least two ways to do the job. Solution one. The dirty solution. This solution moves the control to the beginning of the program using an assembly statement jump.
Sometimes it can be useful if the Arduino UNO could reboot itself without having to push the reset button on the board. There are at least two ways to do the job. As you may have noticed, each time you open or close COM port, your Arduino board resets. This may be good for development, but when you put something.
Arduino Serial Port Communication
Arduino Hardware Serial Port
It is not a very complete solution because it doesn’t reset all the hardware connected to the Arduino board. Thus means that default configurations of the hardware will not be restored. Here you are the function to call to reset the Arduino. Hi, IIUIC, the AVR datasheet specifically does not recommend the IO pin to reset method. During the reset the AVR sets all its IO to inputs or high Z, which means the reset pulse is not held long enough? If the data sheet says don’t do it, its probably best not to?
Also, IIUIC, the watchdog method isn’t that straight forward either? You have to disable the watchdog immediately after reboot, as the watchdog setting survives the reboot? And you'll be stuck in an endless reboot cycle?
Regards, Jon.