#define sensorPin A0
#include <LiquidCrystal.h>
void setup()
{
}
void loop()
{
int reading = analogRead(sensorPin);
float voltage = reading * 5.0;
voltage /= 1024.0;
float temperatureC = (voltage - 0.5) * 100 ;
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
Serial.print(voltage); Serial.print(" volts - ");
Serial.print(temperatureC); Serial.print(" degrees C - ");
Serial.print(temperatureF); Serial.println(" degrees F");
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("volts ");lcd.print(voltage);
// you can now interact with the LCD, e.g.:
delay(3000);
}
//lcd
// LCD1602 to Arduino Uno connection example