use functions for modes
This commit is contained in:
parent
10405e8f76
commit
dbe5f3db65
1 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue