Is there any possibility to programmatically reboot the Arduino?
Ogogon.
Is there any possibility to programmatically reboot the Arduino?
Ogogon.
Yes.
And how?
Ogogon.
Huh. Despite the many discussions about rebooting / resetting the processor the topics are surprisingly difficult to locate through search.
First, you need a watchdog friendly bootloader. Optiboot (the newest bootloader) and ADAboot are good choices.
Second, you add this to the top of your Sketch...
<avr/wdt.h>
Finally, you call this...
void reboot( void )
{
wdt_enable(WDTO_15MS);
while(1) {};
}
Here is a nice summary and a way to make it work with watchdog hostile bootloaders...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1222941939/12#12
More details here...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1229317367/all
First question, is why do you want to reset your processor in run time?
There are more ways than just using the bootloader.
void (*reset)(void) = 0x0000;
or
asm volatile ("jmp 0");
And there are more ways.
Jumping to address zero does not reset / reboot the processor.