- May 18, 2016 at 12:26 pm #4912jingramParticipant
Have you guys has any success with reading the temperature from the LSM9DS0?May 18, 2016 at 2:27 pm #4913Mark WilliamsKeymaster
In C it would be;
uint8_t block; readBlock(0x80 | OUT_TEMP_L_XM, sizeof(block), block); temp = (int16_t)(block | block << 8); float temperature_c = (float)temp / 8.0 + 25; float temperature_f = temperature_c * 1.8 + 32;
Mark --OzzMaker.com --May 19, 2016 at 8:04 am #4916jingramParticipant
Thanks for this.
I got the / 8, but where did you find to add the base 25 deg C in the spec sheet.May 19, 2016 at 10:12 am #4917Mark WilliamsKeymaster
We have been told that this is a reference number to use when calculating temperature on the chip.
If you are using a BerryIMU, you can get the ambient temperature from the BMP180.
Mark --OzzMaker.com --April 30, 2017 at 8:34 pm #6447PEERISParticipant
I have no succeed to work with BMP180 with the python code. The output data are like :
Starting temperature conversion…
Starting pressure conversion…
Temperature: 827 C
Pressure: -4386776 hPa
My aim is to use barometer as an altitude sensor
Is there an explication of BMP180 code to use the sensors as an altimeter ?
- You must be logged in to reply to this topic.