Added working thermocouple code