04-12-2022 06:05 PM
Hi,
I'm using a BMP388 sensor, to read pressure and temperature.
I'm using python with FTDI cable to access sensor through I²C. I can read/write register successfully but I don't understand how to interpret data.
Before try the pressure, I'm testing with temperature sensor:
When reading data register (from 0x07 to 0x09) I'm able to see that this values changes. When reading register 0x31 to 0x35 corresponding to NVM_PAR_T1, NVM_PAR_T2, NVM_PAR_T3, I have respectivly this values: 0xB66B, 0xFD48, 0xF6.
So I use them with the formulas from the datasheet (PAR_T1=NVM_PAR_T1/(2power(-8)), ...)
Also use : CombinedRawData = ((Data3<<16) | (Data2<<8) | Data1)
PartialData1= CombinedRawData -PAR_T1
PartialData2 = PartialData1*PAR_T2
temp = PartialData2 + (PartialData1*PartialData1)*PAR_T3
But "temp" is a weird value around -200.
What did I miss to exploit the BMP388 temperature data from the data registers ?
Thanks,
Antoine
04-29-2022 03:24 AM
Hi antoineB,
You could refer BMP3 sensor API from github: https://github.com/BoschSensortec/BMP3-Sensor-API/tree/master/examples/read_sensor_data
Refer bmp3_get_sensor_data() function to get temperature, pressure value.