Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void spinani(void) {
- if(casocislo < 380 || casocislo > 1172); // NOC -> je-li 19:32 - 6:20
- {
- digitalWrite(RELE1,HIGH);
- digitalWrite(RELE2,HIGH);
- digitalWrite(RELE3,HIGH);
- digitalWrite(RELE4,HIGH);
- lcd.setCursor(5, 2);
- lcd.print(" Noc ");
- }
- if(casocislo >= 380 || casocislo <= 391); // Svitani 1 -> je-li 6:20 - 6:31
- {
- digitalWrite(RELE1,LOW ); // Světlo 1 -> Zapnuto
- lcd.setCursor(5, 2);
- lcd.print("Svitani 1 ");
- }
- if(casocislo >= 385 || casocislo <= 391); // Svitani 2 -> je-li 6:25 - 6:31
- {
- digitalWrite(RELE2,LOW); // Světlo 2 -> Zapnuto
- lcd.setCursor(5, 2);
- lcd.print("Svitani 2 ");
- }
- if(casocislo >= 390 || casocislo <= 1170); // Den -> je-li 6:30 - 19:30
- {
- digitalWrite(RELE3,LOW); // Hlavní světlo -> Zapnuto
- lcd.setCursor(5, 2);
- lcd.print(" Den ");
- }
- if(casocislo >= 1169 || casocislo <= 1171); // Stmívání 1 -> je-li 19:29 - 19:31
- {
- digitalWrite(RELE1,LOW ); // Světlo 1 -> Zapnuto
- lcd.setCursor(5, 2);
- lcd.print("Stmivani 1");
- }
- if(casocislo >= 1169 || casocislo <= 1172); // Stmívání 2 -> je-li 19:29 - 19:32
- {
- digitalWrite(RELE2,LOW); // Světlo 2 -> Zapnuto
- lcd.setCursor(5, 2);
- lcd.print("Stmivani 2");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement