#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Create an LCD instance with I2C address 0x27 and dimensions 20x4
LiquidCrystal_I2C lcdScreen(0x27, 20, 4);
void setup() {
// Set custom I2C pins before initializing communication
Wire.setSDA(8);
Wire.setSCL(9);
Wire.begin(); // Start I2C communication with specified pins
// Start LCD and turn on the backlight
lcdScreen.init();
lcdScreen.backlight();
// Output welcome and info text
lcdScreen.setCursor(0, 0);
lcdScreen.print("Welcome to IoT");
lcdScreen.setCursor(0, 1);
lcdScreen.print("College of CSIT");
lcdScreen.setCursor(0, 2);
lcdScreen.print("Reham ageeli");
lcdScreen.setCursor(0, 3);
lcdScreen.print("IT department");
}
void loop() {
// Loop runs continuously, slight delay to reduce CPU load
delay(20);
}