-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
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 (
raw_temp = unpack_from(">h", temp_data)[0] |
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
Metadata
Metadata
Assignees
Labels
No labels