Adapted the code for the PI control of the heater.