BME68X: Gas Sensor

This sample application sets up the BME68X gas sensor with the Bosch Sensor Environmental Cluster (BSEC) library.


To use the BME68X IAQ driver, you must manually download the BSEC library. See the BME68X IAQ driver documentation for more details.

The sample supports the following devices:

Hardware platforms


Board name

Board target




thingy91/nrf9160/ns thingy91/nrf9160




thingy53/nrf5340/cpuapp/ns thingy53/nrf5340/cpuapp

Building and running

This project outputs sensor data to the console. It requires a BME68X sensor.

This sample can be found under samples/sensor/bme68x_iaq in the nRF Connect SDK folder structure.

To build the sample with Visual Studio Code, follow the steps listed on the How to build an application page in the nRF Connect for VS Code extension documentation. See Configuring and building an application for other building scenarios, Programming an application for programming steps, and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.


After programming the sample to your development kit, test it by performing the following steps:

  1. Connect to the kit with a terminal emulator (for example, nRF Connect Serial Terminal). See Testing and optimization for the required settings and steps.

  2. Reset the kit.

  3. Observe that output similar to the following is logged on UART:

    * Booting Zephyr OS build v3.2.99-ncs1-1531-gaf18f6b63608 *
    [00:00:01.285,339] <inf> app: App started
    [00:00:07.287,658] <inf> app: temp: 28.240385; press: 100043.570312; humidity: 19.981348; iaq: 50
    [00:00:10.301,391] <inf> app: temp: 28.220613; press: 100039.585937; humidity: 19.983814; iaq: 50
    [00:00:13.315,124] <inf> app: temp: 28.188013; press: 100040.007812; humidity: 20.015941; iaq: 50


BSEC takes about 24 hours to calibrate the indoor air quality (IAQ) output.