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
In read():
The correct way to get the data is in the upper 12 bits, not the lower: uint16_t result = (((((uint16_t)high_byte) << 8) | ((uint16_t)low_byte)) & 0xFFF0) >>4;
In readTemperatureConverted():
Similary, use uint16_t raw = (((((uint16_t)high_byte) << 8) | ((uint16_t)low_byte)) & 0xFF10) >>7;
as temperature is in the upper 9 bits.
The text was updated successfully, but these errors were encountered:
In
read()
:The correct way to get the data is in the upper 12 bits, not the lower:
uint16_t result = (((((uint16_t)high_byte) << 8) | ((uint16_t)low_byte)) & 0xFFF0) >>4;
In
readTemperatureConverted()
:Similary, use
uint16_t raw = (((((uint16_t)high_byte) << 8) | ((uint16_t)low_byte)) & 0xFF10) >>7;
as temperature is in the upper 9 bits.
The text was updated successfully, but these errors were encountered: