Resetting Arduino via Code
I’m imagining a circumstance where I might want my arduino to reset itself if a condition occurs. Right now the program is alerting me of this condition, then I have to go and press the reset button. Not hard, but annoying.
Here’s what I’ll use:
int led = 13;//pin 13 as OUTPUT LED pin int resetPin = 12;
I’ll connect my reset pin to a digital pin. Then the code will use a digital.write to bring that pin low, resetting the board. Here’s a fritzing.org diagram: