• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/11-Mar-2024-1511

src/11-Mar-2024-4528

CMakeLists.txtD11-Mar-2024224 106

README.rstD11-Mar-20242 KiB8254

prj.confD11-Mar-202472 54

sample.yamlD11-Mar-2024247 1312

README.rst

1.. _ti_hdc_sample:
2
3TI_HDC Sample
4##############
5
6Description
7***********
8
9This sample application periodically takes Temperature and Humidity
10using the ti_hdc sensor driver. The result is written to the console.
11
12Requirements
13************
14
15This sample needs a compatible sensor like HDC1010 or HDC1080
16connected to the target board's I2C connector.
17
18Example Breakout Boards:
19
20* Pmod HYGRO: Humidity and Temperature Sensor Breakout board
21
22
23Wiring
24******
25
26This sample is tested with the STM32L496ZG nucleo and the Pmod HYGRO
27Temp/RH breakout board.
28
29The sensor operates at 3.3V and uses I2C to communicate with the board.
30
31External Wires:
32
33* Breakout **GND** pin <--> Nucleo **GND** pin
34* Breakout **VCC** pin <--> Nucleo **3V3** pin
35* Breakout **SDA** pin <--> Nucleo **CN7-D14** pin
36* Breakout **SCL** pin <--> Nucleo **CN7-D15** pin
37
38Building and Running
39********************
40
41This sample builds one application for the HDC1080 sensor.
42Build/Flash Steps:
43
44.. zephyr-app-commands::
45   :zephyr-app: samples/sensor/ti_hdc/
46   :board: nucleo_l496zg
47   :goals: build flash
48   :compact:
49
50Sample Output
51*************
52.. code-block:: console
53
54    Running on arm!
55    Dev 0x20001160 name HDC1080 is ready!
56    Fetching...
57    Raw Temp = 25144, Temp = 23.305053 C, Raw RH = 32292, RH = 49.273681 %
58    Fetching...
59    Raw Temp = 25148, Temp = 23.315124 C, Raw RH = 32424, RH = 49.475097 %
60    ...
61
62Build Testing
63**************
64
65.. code-block:: bash
66
67    $ZEPHYR_BASE/scripts/twister -T $ZEPHYR_BASE/samples/sensor/ti_hdc/ -p nucleo_l496zg --device-testing --device-serial /dev/ttyACM0 -t build
68
69Target Testing
70**************
71
72.. code-block:: bash
73
74    $ZEPHYR_BASE/scripts/twister -T $ZEPHYR_BASE/samples/sensor/ti_hdc/ -p nucleo_l496zg --device-testing --device-serial /dev/ttyACM0 -t target
75
76
77References
78**********
79
80.. _Nucleo STM32L496ZG board: https://www.st.com/en/evaluation-tools/nucleo-l496zg.html
81.. _HDC1080 Breakout board: https://store.digilentinc.com/pmod-hygro-digital-humidity-and-temperature-sensor/
82