Skip to content

Instantly share code, notes, and snippets.

@sgk
Created December 7, 2013 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgk/7844892 to your computer and use it in GitHub Desktop.
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回点滅した後にリセットする。ブートローダは動きません。
#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