AnsweredAssumed Answered

LSM303DLHC as outdoor thermometer

Question asked by bulychev.alexand.002 on Dec 11, 2013
Latest reply on Dec 11, 2013 by Thiago.Reis@ST
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?

Outcomes