code for the thermowatch project