I have an adjustable setpoint that controls a relay based on the input from a DS18B20.
What code would enable a variance around a desired SetPoint of 0.5 deg C.
Example:
I adjust the set point to 45 deg C. Though to stop the relay switching on/off erratically around that temperature I'd like to have a variance of 0.5 deg C either side of the SetPoint. So the relay switches on at 44.5 and off at 45.5.
Would I use if else statements or is there another way?
mack85n:
I adjust the set point to 45 deg C. Though to stop the relay switching on/off erratically around that temperature I'd like to have a variance of 0.5 deg C either side of the SetPoint. So the relay switches on at 44.5 and off at 45.5.