Updated thermistor code