From dbe5f3db658de6df215e19792b3cc36b69175677 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Sun, 29 Dec 2019 18:54:11 +0100 Subject: [PATCH] use functions for modes --- Blink/Blink.ino | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Blink/Blink.ino b/Blink/Blink.ino index 5c73cfa..643f6c9 100644 --- a/Blink/Blink.ino +++ b/Blink/Blink.ino @@ -11,16 +11,20 @@ void setup() { } void loop() { + singleOn(500); +} + +void singleOn(int delayTime) { digitalWrite(L, HIGH); - delay(1000); // in ms + delay(delayTime); digitalWrite(L, LOW); digitalWrite(I, HIGH); - delay(1000); // in ms + delay(delayTime); digitalWrite(I, LOW); digitalWrite(N, HIGH); - delay(1000); // in ms + delay(delayTime); digitalWrite(N, LOW); digitalWrite(K, HIGH); - delay(1000); // in ms + delay(delayTime); digitalWrite(K, LOW); }