use functions for modes

This commit is contained in:
Georg Krause 2019-12-29 18:54:11 +01:00
parent 10405e8f76
commit dbe5f3db65

View file

@ -11,16 +11,20 @@ void setup() {
} }
void loop() { void loop() {
singleOn(500);
}
void singleOn(int delayTime) {
digitalWrite(L, HIGH); digitalWrite(L, HIGH);
delay(1000); // in ms delay(delayTime);
digitalWrite(L, LOW); digitalWrite(L, LOW);
digitalWrite(I, HIGH); digitalWrite(I, HIGH);
delay(1000); // in ms delay(delayTime);
digitalWrite(I, LOW); digitalWrite(I, LOW);
digitalWrite(N, HIGH); digitalWrite(N, HIGH);
delay(1000); // in ms delay(delayTime);
digitalWrite(N, LOW); digitalWrite(N, LOW);
digitalWrite(K, HIGH); digitalWrite(K, HIGH);
delay(1000); // in ms delay(delayTime);
digitalWrite(K, LOW); digitalWrite(K, LOW);
} }