zephyr/samples/sensor/bme680
Piotr Kosycarz e63c691a86 samples: sensor: bme680: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:02 +02:00
..
boards samples: sensors: Remove label property from devicetree overlays 2022-07-19 08:23:35 -05:00
src samples: sensor: bme680: Allow coverage calculation 2024-06-14 15:35:02 +02:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
prj.conf sensors: Remove unnecessary Kconfig setting of sensors 2022-07-25 15:18:56 +02:00
README.rst hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
sample.yaml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00

.. _bme680:

BME680: Integrated environmental sensor
#####################################################

Description
***********

This sample application periodically (every 3s) measures the ambient temperature
in degrees Celsius, atmospheric pressure in kilopascal, relative humidity in percentage,
and gas sensor resistance in ohms. The result is written to the console.

References
**********

 - BME680: https://www.bosch-sensortec.com/bst/products/all_products/bme680

Wiring
*******

This sample uses the BME680 sensor controlled using the I2C interface.
Connect Supply: **VDD**, **VDDIO**, **GND** and Interface: **SDA**, **SCL**.
The supply voltage can be in the 1.8V to 3.6V range.
Depending on the baseboard used, the **SDA** and **SCL** lines require Pull-Up
resistors.

Building and Running
********************

This project outputs sensor data to the console. It requires a BME680
sensor. It should work with any platform featuring a I2C peripheral interface.
It does not work on QEMU.
In this example below the :ref:`nrf52840dk_nrf52840` board is used.


.. zephyr-app-commands::
   :zephyr-app: samples/sensor/bme680
   :board: nrf52840dk/nrf52840
   :goals: build flash

Sample Output
=============

.. code-block:: console

   Device 0x20002b74 name is BME680
   T: 23.988877; P: 97.648568; H: 53.689533; G: 1035.211466
   T: 24.168500; P: 97.648866; H: 53.565966; G: 1046.677896
   T: 24.336533; P: 97.648596; H: 53.353663; G: 1058.656533
   T: 24.589696; P: 97.648366; H: 53.958864; G: 1072.155863
   T: 24.856631; P: 97.648322; H: 53.553669; G: 1096.448788

   <repeats endlessly>