#include <LiquidCrystal.h>
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
LiquidCrystal lcd(21,19,5,4,2,15);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0,0);
int analogValue = analogRead(35);
lcd.print("Temperatura");
lcd.setCursor(6,1);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.print(celsius);
delay(10); // this speeds up the simulation
}