MAX31855 giving NaN after some readings
Try to Serial.println(thermocouple.readError()). It will give you an
error code, which is a bit field:


1 = open circuit
2 = short to ground
4 = short to Vcc


C.f. the
datasheet.