Project 1 - Interfacing a 16*2 LCD with Arduino using I2C protocol
OFFLINE BATCH-1
void setup()
{
Serial.begin(9600);
}
void loop()
{
int value = analogRead(A0);//READ ANALOG VALUE
float volt = value *(5.0/1024); //to find output voltage
float r1 = (((5.0/volt)-1)*1000);
Serial.print(volt);//print voltage
Serial.println("v");
Serial.print(r1);
Serial.println("ohm");
delay(1000);
}