// SingleShotMillisDelay.ino #include int led = 13; // Pin 13 has an LED connected on most Arduino boards. millisDelay ledDelay; void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); digitalWrite(led, HIGH); // turn led on // start delay ledDelay.start(10000); } void checkTurnOffLed() { // the led task // check if delay has timed out if (ledDelay.justFinished()) { digitalWrite(led, LOW); // turn led off } } void loop() { checkTurnOffLed(); // call the led task, may just return }