#include<LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
l
float input;
float output;
void setup()
{
lcd.init();
lcd.backlight();
}
void loop()
{
// put your main code here, to run repeatedly:
input=analogRead(A0);
input=5*(input/1023);
lcd.clear();
lcd.setCursor(0,0);
if (input>4.42 || input<3.74)
{
lcd.print("invalid");
}
else
{
output=92.64*input-309.5;
lcd.print(output,"%");
delay(100);
}
}