Created
December 7, 2013 16:32
-
-
Save sgk/7844892 to your computer and use it in GitHub Desktop.
Reset Arduino after flashing 100 times. The bootloader will not work.
Arduinoで、100回点滅した後にリセットする。ブートローダは動きません。
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
#include <avr/wdt.h> | |
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
for (int i = 0; i < 100; i++) { | |
digitalWrite(13, HIGH); | |
delay(30); | |
digitalWrite(13, LOW); | |
delay(30); | |
} | |
wdt_enable(WDTO_120MS); | |
for (;;) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment