Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: bobricius on December 29, 2012, 01:13:35 am

Title: auto reset
Post by: bobricius on December 29, 2012, 01:13:35 am
Hi is possible to add any autoreset feature?
Title: auto reset
Post by: digistump on December 29, 2012, 10:23:31 pm
I don\'t believe this is technically possible, at least not with the current bootloader, but likely not with any. You could of course have your program (thru an i/o pin) cut power to the board and then the pin would shut off allowing power back to it.
Title: auto reset
Post by: duckythescientist on December 29, 2012, 11:12:21 pm
An option that should work: set the watchdog timer to the shortest time then while(1); to get it stuck. It should restart into the bootloader.
Title: auto reset
Post by: Bluebie on December 30, 2012, 02:39:19 am
It\'s not possible, though you could make your program reboot in to the bootloader like ducky said. The digispark arduino software doesn\'t have any built in feature to send a \'please reboot\' command to already booted digisparks though.

I think it\'s better this way - unplugging and plugging back in is a nice clear way to specify which digispark it is you want the program to upload in to, if you have more than one on your computer (I have three already!!)