Last active
August 29, 2015 14:23
-
-
Save monpetit/c96e8114fcd5430044eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const int reset_pin = 5; | |
| uint32_t count = 10; | |
| void software_reset(void) | |
| { | |
| digitalWrite(reset_pin, LOW); | |
| } | |
| void setup() | |
| { | |
| digitalWrite(reset_pin, HIGH); | |
| delay(200); | |
| pinMode(reset_pin, OUTPUT); | |
| Serial.begin(115200); | |
| delay(100); | |
| Serial.println("START..."); | |
| } | |
| void loop() | |
| { | |
| Serial.print("count = "); | |
| Serial.println(count--); | |
| if (count == 0) { | |
| Serial.println("SOFTWARE RESET..."); | |
| delay(500); | |
| software_reset(); | |
| } | |
| delay(1000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment