Mesure température + tension

En effet, je vais faire une moyenne de 2 ou 3 valeurs pour gagner en précision, merci pour l'idée.

john_lenfr:
Par contre je ne comprends pas ta correction:

*  (1.1 * 1000 / 1024) / 10 ;

Perso je fais juste reading * 5.0 / 1024.0;

je suis tombé sur cette correction ici : http://www.instructables.com/id/ARDUINO-TEMPERATURE-SENSOR-LM35/
la personne y explique :

We can get value magic number 0.48828125 from following expression:

(SUPPLY_VOLTAGE x 1000 / 1024) / 10 where SUPPLY_VOLTAGE is 5.0V (the voltage used to power LM35)

1024 is 2^10, value where the analog value can be represented by ATmega (cmiiw) or the maximum value it can be represented is 1023. The actual voltage obtained by VOLTAGE_GET / 1024.

1000 is used to change the unit from V to mV

10 is constant. Each 10 mV is directly proportional to 1 Celcius.

By doing simple math: (5.0 * 1000 / 1024) / 10 = 0.48828125

Voyant que la formule fonctionnait, je n'ai pas poussé plus loin.
J'ai remplacé le 5.0 par 1.1 puisque "la référence interne est donnée pour 1,1 V" lorsque l'ADC est en "mode" INTERNAL, ce qui me donne exactement la bonne température (peut être un coup de chance).