1.. _adt7420:
2
3ADT7420: High accuracy digital I2C temperature sensor
4#####################################################
5
6Description
7***********
8
9This sample application periodically (1Hz) measures the ambient temperature
10in degrees Celsius. The result is written to the console.
11
12When configured in trigger mode the update interval is 5 s, and the
13sample maintains a |plusminus| 1 |deg| C window around a recent
14temperature.  As soon as the temperature goes outside the window an
15interrupt causes the application to display an event and update the
16upper and lower window boundaries.
17
18References
19**********
20
21 - ADT7420: http://www.analog.com/adt7420
22
23Wiring
24*******
25
26This sample uses the ADT7420 sensor controlled using the I2C interface.
27Connect Supply: **VDD**, **GND** and Interface: **SDA**, **SCL**
28and optionally connect the **INT** to a interrupt capable GPIO.
29The supply voltage can be in the 2.7V to 5.5V range.
30Depending on the baseboard used, the **SDA** and **SCL** lines require Pull-Up
31resistors.
32
33Building and Running
34********************
35
36This project outputs sensor data to the console. It requires an ADT7420
37sensor. It should work with any platform featuring a I2C peripheral interface.
38It does not work on QEMU.
39In this example below the :ref:`nrf52dk_nrf52832` board is used.
40
41
42.. zephyr-app-commands::
43   :zephyr-app: samples/sensor/adt7420
44   :board: nrf52dk_nrf52832
45   :goals: build flash
46
47Sample Output
48=============
49
50.. code-block:: console
51
52   *** Booting Zephyr OS build zephyr-v2.1.0-538-g12b2ed2cf7c3  ***
53   device is 0x2000101c, name is ADT7420
54   [0:00:00.011]: temperature 21.203125 Cel
55   [0:00:01.015]: temperature 21.171875 Cel
56   [0:00:02.019]: temperature 21.171875 Cel
57   [0:00:03.023]: temperature 21.187500 Cel
58   [0:00:04.027]: temperature 21.140625 Cel
59
60<repeats endlessly>
61