breeno

your code appears to be ok.
(I don't have a TC74 handy to test it)

Probably the Sensor is faulty, have you tried a different one ?