#include <LiquidCrystal.h>
int ThermistorPin = A0;
int Vo;
float R1 = 3000;
float logR2, R2, T;
float A = 2.783297339, B = -0.4139621528, C = 17.57815707; // Steinhart-Hart and Hart Coefficients
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
Serial.begin(9600);
}
void loop() {
Vo = analogRead(ThermistorPin);
R2 = R1* (1023.0 / (float)Vo - 1.0);
logR2 = log(R2);
T = (1.0 / (A + B*logR2 + C*logR2*logR2*logR2)); // Steinhart and Hart Equation. T = 1 / {A + B[ln(R)] + C[ln(R)]^3}
T = T - 273.15;
//lcd.print("TEMP = ");
//lcd.print(T);
//lcd.print(" C");
Serial.print(T);
delay(500); // Time delay 10 Milliseconds
lcd.clear();
}