9 years, 7 months ago.

Doubts

Doubts about lines:

reading = min;

and

reading = max;

Would not correct :

min = reading;

and

max = reading;

Question relating to:

1 Answer

9 years, 7 months ago.

No. Those lines are to ensure that the reading is within the expected range not to set the max and min values. It is expected that the max and min have already been set correctly.