#include <LiquidCrystal_I2C.h>
const float BETA =3950;
LiquidCrystal_I2C lcd(0x27,20,4);
void setup() {
// put your setup code here, to run once:
lcd.init();
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.backlight();
lcd.scrollDisplayRight();
delay(50);
int analogValue = analogRead(A0);
float celcius = 1 / (log(1/(1023. / analogValue - 1))/ BETA + 1.0 / 298.15) - 273.15;
lcd.setCursor(0,0);
lcd.print("TEMPERATUR");
lcd.setCursor(0,1);
lcd.println(celcius);
lcd.println("C");
delay(50);
}