README.rst
1.. _wsen-hids:
2
3WSEN-HIDS: Humidity and Temperature Sensor
4##########################################
5
6Overview
7********
8
9This sample uses the Zephyr :ref:`sensor_api` API driver to periodically
10read humidity and temperature from the Würth Elektronik WSEN-HIDS
11humidity & temperature sensor and displays it on the console.
12
13By default, samples are read in polling mode. If desired, the data-ready
14interrupt of the sensor can be used to trigger reading of samples.
15
16Requirements
17************
18
19This sample requires a WSEN-HIDS sensor connected via the I2C or SPI interface.
20
21References
22**********
23
24- WSEN-HIDS: https://www.we-online.com/catalog/en/WSEN-HIDS
25
26Building and Running
27********************
28
29This sample can be configured to support WSEN-HIDS sensors connected via
30either I2C or SPI. Configuration is done via the :ref:`devicetree <dt-guide>`.
31The devicetree must have an enabled node with ``compatible = "we,wsen-hids";``.
32See :dtcompatible:`we,wsen-hids` for the devicetree binding.
33
34The sample reads from the sensor and outputs sensor data to the console at
35regular intervals. If you want to test the sensor's trigger mode, specify
36the trigger configuration in the prj.conf file and connect the interrupt
37output from the sensor to your board.
38
39.. zephyr-app-commands::
40 :app: samples/sensor/wsen_hids/
41 :goals: build flash
42
43Sample Output
44=============
45
46.. code-block:: console
47
48 [00:00:00.383,209] <inf> MAIN: HIDS device initialized.
49 [00:00:00.384,063] <inf> MAIN: Sample #1
50 [00:00:00.384,063] <inf> MAIN: Humidity: 29.8 %
51 [00:00:00.384,063] <inf> MAIN: Temperature: 24.9 C
52 [00:00:02.384,979] <inf> MAIN: Sample #2
53 [00:00:02.385,009] <inf> MAIN: Humidity: 29.7 %
54 [00:00:02.385,009] <inf> MAIN: Temperature: 24.9 C
55
56 <repeats endlessly every 2 seconds>
57