Here's what the documentation says:
I2C Device Address:0X6D
- Read the 0xA5 register value, put the read binary value "and" on "11111111101" then write to 0xA5.
- Send instructions 0x0A to 0x30 register for one temperature acquisition, one pressure data acquisition.
- Read the 0x30 register address. If Sco bit is 0,signify the acquisition end, the data can be read.
- Read 0x06, 0x07, 0x08 register address data to form a 24-bit AD value (pressure data AD value)
Assuming you have some basic i2c read/write functionality and the i2c address of 0X6D, a pressure read sudo-function would look something like this:
// 1
i2cSensorAddress = 0x6D; // Make sure you address the sensor properly
int8_t reg = i2cSensorRead(0xA5);
i2cSensorWrite(0xA5, reg & 0xFD); //11111101 in hex
// 2
i2cSensorWrite(0x30, 0x0A);
// 3
while (!(i2cSensorRead(0x30) & 0x08)) { // Wait for transaction (SCO is bit 3)
sleep();
}
// 4
int32_t pressureData = 0;
int8_t dataAddr = 0x06;
for(int i = 0; i < 3; i++){
pressureData = pressureData << 8;
pressureData |= i2cSensorRead(dataAddr++);
}
return pressureData;
Hope that points you in the right direction! Good luck