#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C myLcd(0x27,16,2);
int led[] ={26,27};
void setup(){
Serial.begin(115200);
myLcd.init();
myLcd.backlight();
myLcd.print("Good Morning");
for(int y=0; y < 2; y++){
pinMode(led[y], OUTPUT);
digitalWrite(led[y], HIGH);
}
}
void loop(){
int val = analogRead(36);
Serial.print("LDR Value = ");
Serial.println(val);
myLcd.setCursor(0,1);
myLcd.print("LCD Val = ");
myLcd.setCursor(10,1);
myLcd.print(" ");
myLcd.setCursor(10,1);
myLcd.print(val);
for(int y=0; y < 2; y++){
digitalWrite(led[y], LOW);
delay(1000);
};
for(int y=0; y < 2; y++){
digitalWrite(led[y], HIGH);
delay(1000);
};
}