int pinoNTC = 32;
const float BETA = 3950; // Deve corresponder ao coeficiente beta do termistor
float temp = 0;
String msg = "Temp (*C):";
void setup() {
Serial.begin(115200);
}
void loop() {
int valorAnalog = analogRead(pinoNTC);
float novaTemp = 1 / (log(1 / (4095. / valorAnalog - 1)) / BETA + 1.0 / 298.15) - 273.15;
if (temp != novaTemp) {
Serial.print(msg);
temp = novaTemp;
Serial.println(temp);
}
delay(1000);
}