#include <LiquidCrystal_I2C.h>
#define NTC A1
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
Serial.begin(9600);
pinMode(NTC, INPUT);
}
float temp;
void loop() {
// put your main code here, to run repeatedly:
temp = 1 / (log(1 / (1023. / analogRead(NTC) - 1)) / 3950 + 1.0 / 298.15) - 273.15;
Serial.println(temp);
lcd.clear();
lcd.setCursor(0,0);
lcd.println(temp);
delay(1000);
}