#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
lcd.init();
lcd.backlight();
pinMode(5, OUTPUT);
}
void loop() {
int val=analogRead(A0);
lcd.setCursor(2,0);
lcd.print(val);
if( val<818)
{
digitalWrite(5,0);
}
else digitalWrite(5,1);
}