Broken thermocouple detection

Broken thermocouple detection#

temp = thermo[1].real

if thermo[1].burnout:
    print("TC1: burnout detected")
elif temp < -200:
    print(f"TC1: implausible reading {temp}")
else:
    print(f"TC1: {temp:.1f}")

The library exposes the module’s own status bits: burnout, over_range, and under_range. Use them in preference to inferring a fault from the value alone.