Author Options:

How to RESET an Arduino UNO? Answered

           Can some one tell me how to RESET the Arduino UNO using a software code. The reason for this question would be that I am planning to place the Arduino inside a small box once my project is completed and working. However, I will need to RESET the board quite often. I am aware that there is a RESET button, but it will not be accessible. I want to put another push button outside and somehow manage to connect it to the Reset line on the board. Any help on this will be appreciated. Thanks in advance!


Curious why you need to actually reset the board? Can't 'everything' you do in software simply repeat often, or listen for a button press to begin the code you want?

Good Question!
I was working on a small project for sometime. This project needed circuit changes often cos I was adding new components and doing stuff. Sometimes, the PING sensor connected to the board stops working for few seconds and then start. If I make one more change in the circuit, by adding a resistor or any other component, again this happened and it start bugging me.

This is only during the circuit construction stage. Later I found that, pressing RESET button solves this problem. So for safety I want to have a reset button outside when my project is done!
And I haven't found a reason to have a reset button once the whole project is done!

Just put the extra switch in parallel with the onboard switch. There's nothing magic about it, or connect the pin on the shield connections.

To reset any processor, just jump back to the beginning of the code space, and clear the stack and interrupts.

Great!! I am planning to hook up the extra switch to the RESET pin on the board. I think I will have to declare it in the program and do it that way. Was wondering if there was any other option, but now this looks good. Thanks!