Go Down

Topic: How to reset Arduino UNO without pushing reset button? (Read 2 times) previous topic - next topic

creativen

Anybody, I would like to reset my Arduino UNO just via sending serial command, is it possible and safe for the chip?
Could it be done without pushing reset button?

Thank you ..

retrolefty


Anybody, I would like to reset my Arduino UNO just via sending serial command, is it possible and safe for the chip?
Could it be done without pushing reset button?

Thank you ..


Sure, just learn about using the watch dog timer (WDT), your sketch upon receiving the magic serial command could just activate the WDT which will cause a reset and start you sketch from it's start.

Lefty



Jack Christensen

Yes and yes. When the command is recognized from the serial interface, set the watchdog timer for a short interval (I think 16ms is the shortest), and enter a spin loop. Search the forum for specifics, this gets discussed with fair regularity.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

retrolefty

Just be sure your arduino board is one that has a WDT friendly bootloader such as the current UNO, as older and current mega boards for example will 'brick' with short WDT interrupts, requiring you to reburn the bootloader to recover.


Lefty

PeterH


I would like to reset my Arduino UNO


In most cases you can do it just by closing and reopening the serial port. But why do you want to reset it?
I only provide help via the forum - please do not contact me for private consultancy.

Go Up