#include <DS1307RTC.h>
#include <RTClib.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal.h>
LiquidCrystal_I2C lcd(0x27,20,4);
//LiquidCrystal_I2C lcd(0x3F, 20, 4);
RTC_DS1307 rtc;
#define lamp 7
char HariDalamMinggu[7][12] = {"Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu"};
void setup () {
Serial.begin(9600);
lcd.init();
lcd.backlight();
if (!rtc.begin()) {
lcd.setCursor(3,0);
lcd.print("RTC Not Connected!");
Serial.println("RTC tidak terhubung, Cek kembali wiring!");
while (1);
}
if (!rtc.isrunning()) {
lcd.setCursor(3,0);
lcd.print("RTC Not Working!");
Serial.println("RTC tidak bekerja, Setel ulang waktu!");
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
}
Serial.println("Test modul RTC DS1307 ...");
lcd.setCursor(2,0);
lcd.print("RTC Tested Modul!");
delay(1000);
lcd.clear();
}
void loop () {
DateTime now = rtc.now();
//lcd.setCursor(4,0);
//lcd.print("Jadwal PLTS!");
//lcd.setCursor(0,1);
//lcd.print("PT.Katolec Indonesia");
lcd.setCursor(0,0);
lcd.print(HariDalamMinggu[now.dayOfTheWeek()]);
Serial.print(HariDalamMinggu[now.dayOfTheWeek()]);
lcd.print(", ");
Serial.print(", ");
lcd.setCursor(0,1);
lcd.print(now.day(), DEC);
lcd.print('/');
Serial.print(now.day(), DEC); Serial.print('/');
lcd.print(now.month(), DEC);
lcd.print('/');
Serial.print(now.month(), DEC); Serial.print('/');
lcd.print(now.year(), DEC);
lcd.print(" ");
Serial.print(now.year(), DEC); Serial.print(" ");
lcd.setCursor(12,1);
lcd.print(now.hour(), DEC);
lcd.print(':');
Serial.print(now.hour(), DEC);
Serial.print(':');
lcd.print(now.minute(), DEC);
lcd.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
lcd.print(now.second(), DEC);
lcd.print(" ");
Serial.print(now.second(), DEC);
Serial.println();
delay(1000);
//--------------------- TESTING --------------------------------
//ON PLTS 13/03/2024, 8:29:20
if (now.hour() == 9 && now.minute() == 11 && now.second() == 50 && now.day() == 22 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 13/03/2024, 8:27:20
if (now.hour() == 20 && now.minute() == 00 && now.second() == 20 && now.day() == 22 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//--------------------- MARET 2024 --------------------------------
//OFF PLTS 16/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 16 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 17/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 17 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 23/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 23 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 24/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 24 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 28/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 28 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 29/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 29 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 30/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 30 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 31/03/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 31 && now.month() == 3 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//--------------------- APRIL 2024 --------------------------------
//OFF PLTS 06/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 6 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 15/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 15 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 20/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 20 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 21/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 21 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 27/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 27 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 28/04/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 28 && now.month() == 4 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//--------------------- MEI 2024 --------------------------------
//OFF PLTS 30/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 30 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 1/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 1 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 04/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 4 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 5/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 5 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 08/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 8 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 9/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 9 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 11/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 11 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 12/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 12 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 18/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 18 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 19/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 19 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 22/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 22 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 23/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 23 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 25/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 25 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 26/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 26 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 31/05/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 31 && now.month() == 5 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//--------------------- JUNI 2024 --------------------------------
//ON PLTS 2/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 2 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 8/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 8 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 9/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 9 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 15/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 15 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 17/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 17 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 22/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 22 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 23/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 23 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 25/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 25 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 26/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 26 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 29/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 29 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 30/06/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 30 && now.month() == 6 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//--------------------- JULI 2024 --------------------------------
//OFF PLTS 6/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 6 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 7/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 7 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 13/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 13 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 14/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 14 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 20/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 20 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 21/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 21 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 27/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 27 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 28/07/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 28 && now.month() == 7 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//--------------------- AGUSTUS 2024 --------------------------------
//OFF PLTS 3/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 3 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 4/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 4 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 10/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 10 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 11/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 11 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 16/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 16 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 18/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 18 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 24/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 24 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 25/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 25 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 31/08/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 31 && now.month() == 8 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//--------------------- SEPTEMBER 2024 --------------------------------
//ON PLTS 1/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 1 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 7/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 7 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 8/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 8 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 14/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 14 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 16/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 16 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 21/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 21 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 22/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 22 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//OFF PLTS 28/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 28 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, LOW);
Serial.print("Status: ");
Serial.print("Turn OFF PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS OFF");
}
//ON PLTS 29/09/2024, 19.00
if (now.hour() == 19 && now.minute() == 00 && now.second() == 00 && now.day() == 29 && now.month() == 9 && now.year() == 2024 ) {
digitalWrite(lamp, HIGH);
Serial.print("Status: ");
Serial.print("Turn ON PLTS");
Serial.println(" ");
lcd.setCursor(1,3);
lcd.print(" Status: ");
lcd.print("PLTS ON");
}
//--------------------- OKTOBER 2024 --------------------------------
}