bLINK/Blink/Blink.ino

78 lines
1.4 KiB
Arduino
Raw Normal View History

2019-12-29 17:39:41 +00:00
const int L = 3;
const int I = 5;
2019-12-28 19:05:20 +00:00
const int N = 4;
2019-12-29 17:39:41 +00:00
const int K = 6;
2019-12-29 17:58:00 +00:00
long randomTime;
2019-12-28 19:05:20 +00:00
void setup() {
pinMode(L, OUTPUT);
pinMode(I, OUTPUT);
pinMode(N, OUTPUT);
pinMode(K, OUTPUT);
}
void loop() {
2019-12-29 19:26:13 +00:00
singleOn(100);
2019-12-29 17:54:11 +00:00
}
void singleOn(int delayTime) {
2019-12-28 19:05:20 +00:00
digitalWrite(L, HIGH);
2019-12-29 17:54:11 +00:00
delay(delayTime);
2019-12-28 19:05:20 +00:00
digitalWrite(L, LOW);
digitalWrite(I, HIGH);
2019-12-29 17:54:11 +00:00
delay(delayTime);
2019-12-28 19:05:20 +00:00
digitalWrite(I, LOW);
digitalWrite(N, HIGH);
2019-12-29 17:54:11 +00:00
delay(delayTime);
2019-12-28 19:05:20 +00:00
digitalWrite(N, LOW);
digitalWrite(K, HIGH);
2019-12-29 17:54:11 +00:00
delay(delayTime);
2019-12-29 19:26:13 +00:00
digitalWrite(K, LOW);
2019-12-29 18:11:53 +00:00
}
void MiamiMidnight() {
2019-12-29 17:58:00 +00:00
digitalWrite(L, HIGH);
digitalWrite(I, HIGH);
digitalWrite(N, HIGH);
digitalWrite(K, HIGH);
randomTime = random(1000, 10000);
delay(randomTime);
digitalWrite(K, LOW);
delay(200);
digitalWrite(K, HIGH);
delay(400);
digitalWrite(I, LOW);
delay(200);
digitalWrite(I, HIGH);
delay(300);
2019-12-28 19:05:20 +00:00
digitalWrite(K, LOW);
2019-12-29 17:58:00 +00:00
delay(900);
2019-12-28 19:05:20 +00:00
}
2019-12-29 19:20:52 +00:00
void klinik() {
digitalWrite(K, HIGH);
delay(500);
digitalWrite(L, HIGH);
delay(100);
digitalWrite(K, LOW);
delay(400);
digitalWrite(I, HIGH);
delay(100);
digitalWrite(L, LOW);
delay(400);
digitalWrite(N, HIGH);
delay(100);
digitalWrite(I, LOW);
delay(400);
digitalWrite(I, HIGH);
delay(100);
digitalWrite(N, LOW);
delay(400);
digitalWrite(K, HIGH);
delay(100);
digitalWrite(I, LOW);
delay(400);
digitalWrite(K, LOW);
delay(1000);
}