}
9) Dans l'Environnement de Programmation Intégré d'Arduino (IDE) https://downloads.arduino.cc/arduino-1.8.19-windows.exe:
Saisir, téléverser et tester le programme
const int pinTemp = A0;
// pin of temperature sensor
float temperature;
int B=4275;
float resistance;
// B value of the thermistor
void setup()
{
Serial.begin(9600);
pinMode (AO, INPUT);
//Baud rate for the serial communication of Arduino //Setting the A0 pin as input pin to take data from the
temperature sensor
void loop()
{
int val = analogRead (pinTemp);
resistance=(float) (1023-val) *10000/val;
// get analog value
temperature=1/(log(resistance/10000)/B+1/298.15)-273.15;
// get resistance
Serial.println(temperature);
delay(1000);
}
// delay 1s
// calc temperature