//Canal de YouTube -> RobotUNO
//Proyecto 3
#include <LiquidCrystal.h>
int tempPin = 0;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup(){
lcd.begin(16, 2);
}
void loop(){
int tempReading = analogRead(tempPin);
double tempK = log(10000.0 * ((1024.0 / tempReading - 1)));
tempK = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * tempK * tempK )) * tempK );
float tempC = tempK - 273.15;
lcd.setCursor(0, 0);
lcd.print("Temp C ");
lcd.setCursor(6, 0);
lcd.print(tempC);
delay(500);
}