#include <LiquidCrystal.h>
// Initialize the LCD library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
// LED pin definitions
const int led1 = 2; // Connected to ESP32 pin D2
const int led2 = 13; // Connected to UNO1 pin 13
const int led3 = A3; // Connected to UNO pin A3
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Set up the LCD's number of columns and rows
lcd.begin(20, 4);
// Print messages to the LCD
lcd.setCursor(3, 0);
lcd.print("PRINCE 500220616");
// Initialize the LED pins as outputs
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
// Turn on the LEDs
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led3, HIGH);
// Debugging messages
Serial.println("Setup complete. LEDs should be on.");
Serial.print("LED1 state: ");
Serial.println(digitalRead(led1));
Serial.print("LED2 state: ");
Serial.println(digitalRead(led2));
Serial.print("LED3 state: ");
Serial.println(digitalRead(led3));
}
void loop() {
// No actions needed in the loop
}