This Arduino library handles basic logic for thermostat opeartion.
- Histeresis support
- Arduino millis() is a base for the library.
- Download the latest version
- Load the
.zip
with Sketch → Include Library → Add .ZIP Library
See examples folder for examples.
Instantiate a Thermostat instance.
Sets new desired temperature which will be compared with measured one.
Must be called in loop()
. Don't call delay()
in loop() as it will block the loop, so Thermostat will malfunction.
Set the operation handler to service operations as defined in ThermostatOperation (e.g. HEATING_ON).
Must be called at least one time before .loop().
Set the function handler that needs to be called to get current readout of the temperature. Function needs to return float.
Allows to setup how often the readout of the current temperature will happen and what is the hysteresis.