Alarm light

void setup() {
analogWrite(2, 255);
analogWrite(3, 255);
analogWrite(4, 255);
analogWrite(5, 255);
analogWrite(6, 255);
analogWrite(7, 255);
for(int i1 = 22; i1 <= 39; i1++) {
analogWrite(i1, 255);
}
delay(180000);
for(int i1 = 22; i1 <= 39; i1++) {
analogWrite(i1, 0);
}
for(int i = 255; i >= 0; i–) {
analogWrite(5, i);
delay(10);
analogWrite(6, i);
delay(10);
analogWrite(2, i);
delay(10);
analogWrite(3, i);
delay(10);
analogWrite(4, i);
delay(10);
}
analogWrite(7, 0);
delay(25200000); // 6 h = 21600000 ms; 7 h = 25200000 ms; 7,5 h = 27000000 ms; 8 h = 28800000 ms; 9 h = 32400000 ms;
for(int i = 0; i <= 255; i++) {
analogWrite(5, i);
delay(2000);
analogWrite(6, i);
delay(2000);
analogWrite(2, i);
delay(2000);
analogWrite(3, i);
delay(2000);
analogWrite(4, i);
delay(2000);
}
delay(900000);
}
void loop() {
analogWrite(7, 255);
analogWrite(2, 255);
delay(200);
analogWrite(2, 0);
delay(200);
analogWrite(3, 255);
delay(200);
analogWrite(3, 0);
delay(200);
analogWrite(4, 255);
delay(200);
analogWrite(4, 0);
delay(200);
analogWrite(5, 255);
delay(200);
analogWrite(5, 0);
delay(200);
analogWrite(6, 255);
analogWrite(7, 0);
delay(200);
analogWrite(6, 0);
delay(200);
for(int ii = 22; ii <= 39; ii++) {
analogWrite(ii, 0);
}
analogWrite(2, 255);
analogWrite(3, 255);
analogWrite(4, 255);
analogWrite(5, 255);
analogWrite(6, 255);
delay(200);
analogWrite(2, 0);
analogWrite(3, 0);
analogWrite(4, 0);
analogWrite(5, 0);
analogWrite(6, 0);
delay(200);
for(int ii = 22; ii <= 39; ii++) {
analogWrite(ii, 255);
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s