#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.init();
lcd.backlight();
}
void loop() {
// put your main code here, to run repeatedly:
int ldrValue = analogRead(A0);
//Serial.println(ldrValue);
delay(200);
lcd.setCursor(3, 0);
lcd.print("VALUE: ");
lcd.print(ldrValue);
if (ldrValue<80){
analogWrite(3, HIGH);
}else{
analogWrite(3, LOW);
}
delay(1250);
lcd.clear();
}