Pressure Sensors MS5611 MS5803

c00laris:
Hi,
I found the same problemm for temperatures below 20°C. dt then gets negative. The uint_32 then roll to big numbers
I changed dt to int32_t and the line for calculation of dt as follows:
dT = D2 - ((int32_t)C[5] << 8);
Now it seems to work. :wink:
BR
c00laris
...

That's a bad idea because C[] can be between 0 - 65535!

To solve the problem in the code you are using use:

dT = D2 - ((uint64_t)C[5] << 8);