#include <LiquidCrystal_I2C.h>
const int ldrPin = A0;
int ldrValue;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.begin(16, 2);
lcd.init();
lcd.backlight();
}
void loop() {
// put your main code here, to run repeatedly:
ldrValue = analogRead(ldrPin);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("LDR Value:");
lcd.setCursor(0, 1);
lcd.print(ldrValue);
delay(500);
}