03-06-2023 08:35 PM - edited 03-06-2023 08:45 PM
Hello,
I have this BME688 chip integrated with nrf9160 processor using I2C. Right now, Im just using the BME688 sensorAPI library on git to get the gas resistance value. I tested the chip to check for VOC's exposing it to an exhaust of an automobile, but it keeps giving the same resistance of 64000. The temperature value seems to be changing (not using the pressure and humidity function of the sensor yet). Can someone explain what is happening:
This is the code of the math involved in calculating resistance:
03-07-2023 09:34 AM
Hi Vamsi1,
You could strictly refer BME68X sensor API, and see the gas resistance value.
/* This internal API is used to read variant ID information from the register */
static int8_t read_variant_id(struct bme68x_dev *dev)
{
int8_t rslt;
uint8_t reg_data = 0;
/* Read variant ID information register */
rslt = bme68x_get_regs(BME68X_REG_VARIANT_ID, ®_data, 1, dev);
if (rslt == BME68X_OK)
{
dev->variant_id = reg_data;
}
return rslt;
}
if (dev->variant_id == BME68X_VARIANT_GAS_HIGH)
{
data[i]->gas_resistance = calc_gas_resistance_high(adc_gas_res_high, gas_range_h);
}
else
{
data[i]->gas_resistance = calc_gas_resistance_low(adc_gas_res_low, gas_range_l, dev);
}