#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27, 16 column and 2 rows
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
}
void loop() {
int analogValue = analogRead(A0);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(celsius);
lcd.setCursor(5, 0);
lcd.print(" Degrees");
lcd.setCursor(0, 6);
lcd.print("Temperature");
delay(1000);
}