- set temp offset to -1°C
This commit is contained in:
@@ -15,7 +15,7 @@ class TempSensor_max31865(ATemperatureSensor):
|
|||||||
self.spi.open(0, 0)
|
self.spi.open(0, 0)
|
||||||
self.spi.max_speed_hz = 50000
|
self.spi.max_speed_hz = 50000
|
||||||
self.spi.mode = 0b01
|
self.spi.mode = 0b01
|
||||||
self.temp_correction = -0.2
|
self.temp_correction = -1.0
|
||||||
self.write_reg(0x00, 0xA3)
|
self.write_reg(0x00, 0xA3)
|
||||||
time.sleep(0.100)
|
time.sleep(0.100)
|
||||||
self.digits = 0
|
self.digits = 0
|
||||||
@@ -48,7 +48,7 @@ class TempSensor_max31865(ATemperatureSensor):
|
|||||||
return None
|
return None
|
||||||
R = TempSensor_max31865.calc_R(430, digits)
|
R = TempSensor_max31865.calc_R(430, digits)
|
||||||
T = TempSensor_max31865.vanDusen_temp(R) + self.temp_correction
|
T = TempSensor_max31865.vanDusen_temp(R) + self.temp_correction
|
||||||
# print("R={:.3f} Ohm, T={:.2f} degC".format(R, T))
|
print("R={:.3f} Ohm, T={:.2f} degC".format(R, T))
|
||||||
return T
|
return T
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user