09-26-2019 06:45 PM
Development in C language under Raspian on Raspberry Pi3. BME680.
BME series are provided with their drivers on the site GitHub. It's really useful. But no documentation comes with them. Not clear how to use the functions. Is there somewhere a documentation on, for instance, https://github.com/BoschSensortec/BME680_driver? and even on BSEC ? After having read the values of temperature, humidity, pressure, AQ resistance, is it required to compensate (unless for the pressure depending on the altitude)? or are these compensations automatic?
At the address, https://github.com/twartzek/bme680-raspberry/blob/master/bme680_main.c, I find the very useful instruction:
i2cSetAddress(BME680_I2C_ADDR_SECONDARY);
essential for the i2c connexion to the sensor (unless I got the error 2).
Solved! Go to Solution.
09-26-2019 08:06 PM
@erickringot wrote:
BME series are provided with their drivers on the site GitHub. It's really useful. But no documentation comes with them. Not clear how to use the functions. Is there somewhere a documentation on, for instance, https://github.com/BoschSensortec/BME680_driver? and even on BSEC ?
There is limited example code available for the BME680 but the README file in our official sensor API you linked should already provide pointers on how to integrate this sensor API in your project, including how to initialize the sensor API structure, how to configure and trigger a measurement as well as how to trigger a data readout.
@erickringot wrote:
and even on BSEC ?
There is also additional example code available in our BSEC release package 🙂 In the "examples" folder of this package, you will find for instance that bsec_integration.c makes extensive use of the sensor API when any communication with the BME680 is required.
@erickringot wrote:
After having read the values of temperature, humidity, pressure, AQ resistance, is it required to compensate (unless for the pressure depending on the altitude)? or are these compensations automatic?
By using the sensor API alone, you will be able to readout raw temperature (in °C), relative humidity (in %RH), barometric pressure (in Pa) and gas resistance (in Ohms) directly from the sensor. When using the BSEC library, you will be able to benefit from additionnal data processing and new ouputs such as sensor heat-compensated temperature and relative humidity, heat compensation from external factors (e.g. from PCB self-heating), our IAQ indexes, etc.
@erickringot wrote:
At the address, https://github.com/twartzek/bme680-raspberry/blob/master/bme680_main.c, I find the very useful instruction:
i2cSetAddress(BME680_I2C_ADDR_SECONDARY);
essential for the i2c connexion to the sensor (unless I got the error 2).
It is indeed very important that you code/sensor API implementation matches your hardware setup! Once the I²C address is selected in hardware by connected the SDO pin of BME680 to VDDIO or GND, the respective address should be indicated to the sensor API structure, in particular via dev_id.