#include <LiquidCrystal.h>
// initialize the library with the pins on the Arduino board
LiquidCrystal lcd(13, 12, 6, 4, 3, 2);
const int D = 8; // Vo of LCD is connected to pin 8 of the Arduino
void setup() {
lcd.begin(16, 2);
Serial.begin(9600);
pinMode(D, OUTPUT);
}
void loop() {
digitalWrite(D,LOW);
int Temp = analogRead(A0);
float volts = (Temp/965.0) * 5;
float celcius = (volts-0.5) * 100;
float fahrenheit = (celcius * 9 / 5 + 32);
Serial.println(fahrenheit);
lcd.setCursor(5, 0);
lcd.print(fahrenheit);
lcd.setCursor(3, 1) ;
lcd.print("Fahrenheit");
delay(50);
// time delay of 2000 microseconds or 2 seconds
}