Part 1
요약·해설
VDD·VOUT wiring, ambient-temp0 alias와 lower·upper alert를 설명합니다.
1 Hz
AIN7 overlay
Lower · Upper
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
97C4694F6D6961FECA9E9333A96F14AB5C5DFF99F4D4F53DEE47C30F2331B968
.. _thermometer-sample:
Thermometer sample
##################
Overview
********
This sample application periodically measures the ambient temperature
at 1Hz. The result is written to the console.
Wiring
*******
VDD pin should be connected to 2.3V to 5.5V
GND pin connected to 0V
VOUT pin connected to the ADC input pin.
.. _`MCP970X Sensor`: http://ww1.microchip.com/downloads/en/devicedoc/20001942g.pdf
An overlay is provided for the nrf52840dk/nrf52840 board with the
sensor connected to pin AIN7.
Building and Running
********************
To build for the nrf52840dk/nrf52840 board use:
.. zephyr-app-commands::
:zephyr-app: samples/sensor/thermometer
:board: nrf52840dk/nrf52840
:goals: build flash
:compact:
To build for other boards and ambient temperature sensors, enable the sensor
node that supports ``SENSOR_CHAN_AMBIENT_TEMP`` and use an overlay to create an
alias named ``ambient-temp0`` to link to the node. See the overlay used for the
``nrf52840dk/nrf52840`` board within this sample:
``boards/nrf52840dk_nrf52840.overlay``
Temperature Alert
=================
If the attached sensor supports alerts when the temperature drifts above or
below a threshold, the sample will enable the sensor's trigger functionality.
This will require the sensor's TRIGGER KConfig setting to be enabled. An
example of this setup is provided for the ``frdm_k22f`` board, using
``boards/frdm_k22f.conf``.
Sample Output
=============
.. code-block:: console
*** Booting Zephyr OS build zephyr-v3.3.0-2354-gb4f4bd1f1c22 ***
Thermometer Example (arm)
Temperature device is 0x525c, name is tcn75a@48
Set temperature lower limit to 25.5°C
Set temperature upper limit to 26.5°C
Enabled sensor threshold triggers
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.5°C
Temperature above threshold: 26.5°C
Temperature is 26.5°C
Part 3
한국어 전문 번역
개요
이 sample application은 ambient temperature를 1 Hz로 주기적으로 측정해 console에 기록합니다.
배선
- VDD pin: 2.3 V에서 5.5 V
- GND pin: 0 V
- VOUT pin: ADC input pin
MCP970X Sensor를 사용할 수 있습니다. nrf52840dk/nrf52840 board에서는 sensor를 AIN7 pin에 연결하는 overlay가 제공됩니다.
빌드 및 실행
nrf52840dk/nrf52840 board용 build와 flash 명령은 다음과 같습니다.
west build -b nrf52840dk/nrf52840 samples/sensor/thermometer
west flash
다른 board나 ambient-temperature sensor를 사용하려면 SENSOR_CHAN_AMBIENT_TEMP를 지원하는 sensor node를 활성화하고, ambient-temp0 alias가 그 node를 가리키는 overlay를 만드십시오. Sample의 boards/nrf52840dk_nrf52840.overlay를 참고할 수 있습니다.
Temperature alert
연결한 sensor가 temperature가 threshold 위나 아래로 벗어날 때 alert를 지원하면 sample이 trigger 기능을 활성화합니다. Sensor의 TRIGGER Kconfig setting을 활성화해야 하며, frdm_k22f용 boards/frdm_k22f.conf가 설정 예를 제공합니다.
출력 예
*** Booting Zephyr OS build zephyr-v3.3.0-2354-gb4f4bd1f1c22 ***
Thermometer Example (arm)
Temperature device is 0x525c, name is tcn75a@48
Set temperature lower limit to 25.5°C
Set temperature upper limit to 26.5°C
Enabled sensor threshold triggers
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.0°C
Temperature is 25.5°C
Temperature above threshold: 26.5°C
Temperature is 26.5°C
예시는 lower limit 25.5°C, upper limit 26.5°C를 설정하고 26.5°C에서 upper-threshold event를 보고합니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.