// #include <RTClib.h>
// RTC_DS1307 rtc;
// char daysOfWeek[7][12] = {
// "Sunday",
// "Monday",
// "Tuesday",
// "Wednesday",
// "Thursday",
// "Friday",
// "Saturday"
// };
// void setup () {
// Serial.begin(9600);
// if (! rtc.begin()) {
// Serial.println("RTC module is NOT found");
// Serial.flush();
// while (1);
// }
// // automatically sets the RTC to the date & time on PC this sketch was compiled
// rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
// // manually sets the RTC with an explicit date & time, for example to set
// // January 21, 2021 at 3am you would call:
// // rtc.adjust(DateTime(2021, 1, 21, 3, 0, 0));
// }
// void loop () {
// DateTime now = rtc.now();
// Serial.print("ESP32 RTC Date Time: ");
// Serial.print(now.year(), DEC);
// Serial.print('/');
// Serial.print(now.month(), DEC);
// Serial.print('/');
// Serial.print(now.day(), DEC);
// Serial.print(" (");
// Serial.print(daysOfWeek[now.dayOfTheWeek()]);
// Serial.print(") ");
// Serial.print(now.hour(), DEC);
// Serial.print(':');
// Serial.print(now.minute(), DEC);
// Serial.print(':');
// Serial.println(now.second(), DEC);
// delay(1000); // delay 1 seconds
// }
#include <LCD_I2C.h>
LCD_I2C lcd(0x27, 16, 2); // Default address of most PCF8574 modules, change according
void setup()
{
lcd.begin(); // If you are using more I2C devices using the Wire library use lcd.begin(false)
// this stop the library(LCD_I2C) from calling Wire.begin()
lcd.backlight();
}
void loop()
{
lcd.print(" Hello"); // You can make spaces using well... spaces
lcd.setCursor(5, 1); // Or setting the cursor in the desired position.
lcd.print("World!");
delay(500);
// Flashing the backlight
for (int i = 0; i < 5; ++i)
{
lcd.backlight();
delay(50);
lcd.noBacklight();
delay(50);
}
lcd.backlight();
lcd.clear();
delay(500);
}