Part 1
요약·해설
전원·I2C·INT 배선, 2.7~5.5 V 조건과 nRF52 DK 실행 절차를 설명합니다.
I2C
1 Hz
±1 °C window
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
F75560232CB38404C9913F3984CF12A164802C2FB656B6F654C17146B2512DE0
.. _adt7420:
ADT7420: High accuracy digital I2C temperature sensor
#####################################################
Description
***********
This sample application periodically (1Hz) measures the ambient temperature
in degrees Celsius. The result is written to the console.
When configured in trigger mode the update interval is 5 s, and the
sample maintains a |plusminus| 1 |deg| C window around a recent
temperature. As soon as the temperature goes outside the window an
interrupt causes the application to display an event and update the
upper and lower window boundaries.
References
**********
- ADT7420: https://www.analog.com/adt7420
Wiring
*******
This sample uses the ADT7420 sensor controlled using the I2C interface.
Connect Supply: **VDD**, **GND** and Interface: **SDA**, **SCL**
and optionally connect the **INT** to a interrupt capable GPIO.
The supply voltage can be in the 2.7V to 5.5V 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 an ADT7420
sensor. It should work with any platform featuring a I2C peripheral interface.
It does not work on QEMU.
In this example below the :ref:`nrf52dk_nrf52832` board is used.
.. zephyr-app-commands::
:zephyr-app: samples/sensor/adt7420
:board: nrf52dk/nrf52832
:goals: build flash
Sample Output
=============
.. code-block:: console
*** Booting Zephyr OS build zephyr-v2.1.0-538-g12b2ed2cf7c3 ***
device is 0x2000101c, name is ADT7420
[0:00:00.011]: temperature 21.203125 Cel
[0:00:01.015]: temperature 21.171875 Cel
[0:00:02.019]: temperature 21.171875 Cel
[0:00:03.023]: temperature 21.187500 Cel
[0:00:04.027]: temperature 21.140625 Cel
<repeats endlessly>
Part 3
한국어 전문 번역
설명
이 sample application은 1 Hz 주기로 주변 온도를 섭씨 단위로 측정하고 결과를 console에 출력합니다.
Trigger mode로 구성하면 update interval은 5초가 되며, sample은 최근 온도를 중심으로 ±1 °C window를 유지합니다. 온도가 window를 벗어나는 즉시 interrupt가 발생하여 application이 event를 표시하고 upper·lower window boundary를 갱신합니다.
참고 자료
배선
이 sample은 I2C interface로 제어하는 ADT7420 sensor를 사용합니다. 전원 VDD와 GND, interface의 SDA와 SCL을 연결하고, 필요하면 INT를 interrupt를 지원하는 GPIO에 연결합니다.
Supply voltage 범위는 2.7 V부터 5.5 V까지입니다. 사용하는 baseboard에 따라 SDA와 SCL line에 pull-up resistor가 필요합니다.
빌드 및 실행
이 project는 sensor data를 console에 출력하며 ADT7420 sensor가 필요합니다. I2C peripheral interface가 있는 모든 platform에서 동작해야 하지만 QEMU에서는 동작하지 않습니다. 아래 예에서는 nrf52dk/nrf52832 board를 사용합니다.
# From the root of the zephyr repository
west build -b nrf52dk/nrf52832 samples/sensor/adt7420
west flash
출력 예
*** Booting Zephyr OS build zephyr-v2.1.0-538-g12b2ed2cf7c3 ***
device is 0x2000101c, name is ADT7420
[0:00:00.011]: temperature 21.203125 Cel
[0:00:01.015]: temperature 21.171875 Cel
[0:00:02.019]: temperature 21.171875 Cel
[0:00:03.023]: temperature 21.187500 Cel
[0:00:04.027]: temperature 21.140625 Cel
이 출력은 끝없이 반복됩니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.