You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) unpacking the measurement as a signed short - I think it should be unsigned, just like with relative humidity. So that line would change from
raw_temp = unpack_from(">h", temp_data)[0]
to
raw_temp = unpack_from(">H", temp_data)[0]
Temperatures higher than 42.5 degress C (108.5 degrees F) are coming back as very large negative numbers. I think this is due to line 198 (
Adafruit_CircuitPython_SHTC3/adafruit_shtc3.py
Line 198 in 8e0fea8
raw_temp = unpack_from(">h", temp_data)[0]
to
raw_temp = unpack_from(">H", temp_data)[0]
In the next line, we're already subtracting 4500 from the value, which is how we get to negative temperatures. Looking at the Arduino library, it looks like they use the value as unsigned:
https://github.com/adafruit/Adafruit_SHTC3/blob/8d48fd2708027c0f943743077f3fbae8b51a9f29/Adafruit_SHTC3.cpp#L159
The text was updated successfully, but these errors were encountered: