2013-12-10 11:06 PM
I want to use lsm303dlhc as outdoor thermometer.
I use next code int8_t value= 25+data[0];uint8_t sign=value&0x80;
uint8_t cels=0;
if(sign)
cels=(~value)+1;
else
cels=value; but when temperature is minus i have value 11, it is wrong. How can i use this right?
2013-12-11 08:42 AM
Hello Alexander,
Your logic seems to be right, have you had the chance on testing with another part? Could you please also provide more details on the final application that you are developing? The reason for that is because LSM303DLHC is not recommended for new designs, I would therefore suggest you to move with LSM303D. Thank you, Thiago Reis