Displaying the max and min temperature

NRPC:
Hello ! :slight_smile:

I'm actually trying to display the maximum and the minimum temperature while my arduino uno is running :

  • For exemple if the actual temperature is 10°C and change to 9°C 1 minute later, i want my console show me : Minimum temperature : 9°C until it changes to another lower value and the same for the max temperature until it changes to an higher value

And here is my actual not working "script", the value don't wanna change !
Screenshot by Lightshot

Hope you understood !
Thanks ! :slight_smile:

you will need to make some of those variables persistent if you want to maintain their values each time loop() terminates.

so read up on scope and the static keyword