#include <LiquidCrystal_I2C.h>
#define LDR 4
#define TEMP 2
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
lcd.setCursor(0,0);
pinMode(LDR, INPUT);
pinMode(TEMP, INPUT);
lcd.print("welcome");
delay(2000);
lcd.clear();
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0, 0);
int ADCValue = analogRead(LDR);
lcd.print("LDR=");
lcd.print(ADCValue);
delay(100); // this speeds up the simulation
lcd.setCursor(0, 1);
lcd.print("TEMP=");
int ADCValue1 = analogRead(TEMP);
lcd.print(ADCValue1);
delay(100); // this speeds up the simulation
}