#include <LiquidCrystal_I2C.h>
#define LDR 28 // pin AO de LDR
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
lcd.setCursor(2, 0);
lcd.print("LDR:");
pinMode(LDR, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(6,1);
int adcValue = analogRead(LDR);
lcd.print(adcValue); // se imprime el valor de la LDR
delay(100);
}