const int sensorPin = 34; // Pin du capteur de température connecté à l'ADC
const float beta = 3950.0;
const float Temp_0 = 1.0 / 298.15;
void setup() {
Serial.begin(115200);
}
void loop() {
int sensorValue = analogRead(sensorPin);
float resistance = 4095.0 / sensorValue - 1.0;
float temperature = 1.0 / (log(1.0 / resistance) / beta + Temp_0) - 273.15;
Serial.print("Température : ");
Serial.print(temperature);
Serial.println(" °C");
delay(2000); // Attendre 2 secondes
}