samples/drivers/w1/scanner/README.html · samples/drivers/w1/scanner/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Drivers · 1-Wire

1-Wire Scanner

Overlay를 선택하고 scan 한 번으로 연결된 device를 열거합니다.

Official pathsamples/drivers/w1/scanner/README.html
Source filesamples/drivers/w1/scanner/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

두 overlay 선택지, build 명령과 device 3개 출력을 보존합니다.

Bus

1-Wire

Overlays

DS2484 · Serial

Found

3 devices

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 861E85F3D30688DCAC577D4611CFF6CC7862423602826D00369BB6F40C5228D9
.. zephyr:code-sample:: w1-scanner
   :name: 1-Wire scanner
   :relevant-api: w1_interface

   Scan for 1-Wire devices and print their family ID and serial number.

Overview
********

This sample demonstrates how to scan for 1-Wire devices. It runs the 1-Wire
scan routine once and prints the family id as well as serial number of the
devices found.

Building and Running
********************

Set DTC_OVERLAY_FILE to "ds2484.overlay" or "w1_serial.overlay" in order to
enable and configure the drivers.

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/w1/scanner
   :board: nrf52840dk/nrf52840
   :gen-args: -DDTC_OVERLAY_FILE=w1_serial.overlay
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

    [00:00:00.392,272] <inf> main: Device found; family: 0x3a, serial: 0x3af9985800000036
    [00:00:00.524,169] <inf> main: Device found; family: 0x3a, serial: 0x3a6ea2580000003b
    [00:00:00.656,097] <inf> main: Device found; family: 0x28, serial: 0x2856fb470d000022
    [00:00:00.656,097] <inf> main: Number of devices found on bus: 3

Part 3

한국어 전문 번역

개요

이 sample은 1-Wire device를 scan하는 방법을 보여줍니다. 1-Wire scan routine을 한 번 실행하고 발견된 device의 family ID와 serial number를 출력합니다.

Build와 실행

Driver를 활성화하고 설정하려면 DTC_OVERLAY_FILE을 ds2484.overlay 또는 w1_serial.overlay로 지정합니다.

west build -b nrf52840dk/nrf52840 samples/drivers/w1/scanner -- -DDTC_OVERLAY_FILE=w1_serial.overlay
west flash

Sample 출력

[00:00:00.392,272] <inf> main: Device found; family: 0x3a, serial: 0x3af9985800000036
[00:00:00.524,169] <inf> main: Device found; family: 0x3a, serial: 0x3a6ea2580000003b
[00:00:00.656,097] <inf> main: Device found; family: 0x28, serial: 0x2856fb470d000022
[00:00:00.656,097] <inf> main: Number of devices found on bus: 3

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.