BME68X Gas Sensor¶
Overview¶
The BME68X Gas Sensor sample sets up the BME68X gas sensor with the Bosch Sensor Environmental Cluster (BSEC) library.
Here is the overlay file which supports this sample.
Requirements¶
Before you start, check that you have the required hardware and software:
- 1x nRF54L15 Connect Kit
- 1x USB-C Cable
- 1x BME688 Sensor (e.g., Seeed Studio's Grove - Air Quality Sensor(BME688))
- A computer running macOS, Ubuntu, or Windows 10 or newer
Wiring the sensor¶
Refer to the following figure for proper BME688 sensor connection to the nRF54L15 Connect Kit before applying power.
Building the sample¶
To build the sample, follow the instructions in Getting Started Guide to set up your preferred building environment.
You can use the BME68X IAQ driver to run the Bosch Sensor Environmental Cluster (BSEC) library in order to get Indoor Air Quality (IAQ) readings.
The BSEC library is distributed with a Bosch proprietary license (BSEC license) that prevents it from being part of nRF Connect SDK. To start using it, you have to accept the license and enable the download by running the following commands in the nrf
folder:
Use the following steps to build the BME68X Gas Sensor sample on the command line.
-
Open a terminal window.
-
Go to
NCS-Project/nrf54l15-connectkit
repository cloned in the Getting Started Guide. -
Build the sample using the
west build
command, specifying the board (following the-b
option) asnrf54l15_connectkit/nrf54l15/cpuapp
.Tip
The
-p
always option forces a pristine build, and is recommended for new users. Users may also use the-p auto
option, which will use heuristics to determine if a pristine build is required, such as when building another sample. -
After building the sample successfully, the firmware with the name
merged.hex
can be found in thebuild
directory.
Flashing the firmware¶
Connect the nRF54L15 Connect Kit to the computer with a USB-C cable:
Then flash the sample using west flash
:
Tip
In case you wonder, the west flash
will execute the following command:
Testing¶
After programming the sample, test it by performing the following steps:
-
Open up a serial terminal, specifying the primary COM port that your computer uses to communicate with the nRF54L15:
- Start PuTTY.
-
Configure the correct serial port and click Open:
-
Press the DFU/RST button to reset the nRF54L15.
-
Observe the output of the terminal. You should see the output, similar to what is shown in the following:
Note
BSEC takes about 24 hours to calibrate the indoor air quality (IAQ) output.