2013-12-29 03:04:42 +00:00
|
|
|
const unsigned int LED_PIN = 13;
|
2013-12-29 03:26:28 +00:00
|
|
|
const unsigned int PAUSE = 700;
|
|
|
|
const unsigned int FLASH_DURATION = 100;
|
|
|
|
|
|
|
|
|
|
|
|
void flash(int n) {
|
2013-12-30 05:00:35 +00:00
|
|
|
for (int i = 0; i < n; i++) {
|
|
|
|
digitalWrite(LED_PIN, HIGH);
|
|
|
|
delay(FLASH_DURATION);
|
|
|
|
digitalWrite(LED_PIN, LOW);
|
|
|
|
delay(FLASH_DURATION);
|
|
|
|
}
|
2013-12-29 03:26:28 +00:00
|
|
|
}
|
2013-12-29 03:04:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
void setup() {
|
2013-12-30 05:00:35 +00:00
|
|
|
pinMode(LED_PIN, OUTPUT);
|
2013-12-29 03:04:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loop() {
|
2013-12-30 05:00:35 +00:00
|
|
|
for (int i = 1; i < 4; i++) {
|
|
|
|
flash(i);
|
|
|
|
delay(PAUSE);
|
|
|
|
}
|
2013-12-29 03:04:42 +00:00
|
|
|
delay(PAUSE);
|
2013-12-29 03:13:55 +00:00
|
|
|
}
|