samples/sensor/lis2dh/README.html · samples/sensor/lis2dh/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Sensor · Motion

LIS2DH motion sensor monitor

LIS2DH 계열의 세 축 acceleration을 0.5 Hz로 읽고 console에 표시합니다.

Official pathsamples/sensor/lis2dh/README.html
Source filesamples/sensor/lis2dh/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

호환 sensor 4종, 지원 hardware, 두 build 구성과 반복 출력을 설명합니다.

Family

LIS2DH compatible

Axes

x · y · z

Rate

0.5 Hz

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 8FAD586C3754D773D1F149CB23B37083475A9A78BF147CBE6DAEBB4E40571F10
.. _lis2dh:

LIS2DH: Motion Sensor Monitor
#############################

Overview
********

This sample application periodically reads accelerometer data from the
LIS2DH sensor (or the compatible LS2DH12, LIS3DH, and LSM303DLHC
sensors), and displays the sensor data on the console.

Requirements
************

This sample uses the LIS2DH, ST MEMS system-in-package featuring a 3D
digital output motion sensor.

References
**********

For more information about the LIS2DH motion sensor see
https://www.st.com/en/mems-and-sensors/lis2dh.html.

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

The LIS2DH2 or compatible sensors are available on a variety of boards
and shields supported by Zephyr, including:

* :ref:`actinius_icarus`
* :ref:`thingy52_nrf52832`
* :ref:`stm32f3_disco_board`
* :ref:`x-nucleo-iks01a2`

See the board documentation for detailed instructions on how to flash
and get access to the console where acceleration data is displayed.

Building on actinius_icarus
===========================

:ref:`actinius_icarus` includes an ST LIS2DH12 accelerometer which
supports the LIS2DH interface.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/lis2dh
   :board: actinius_icarus
   :goals: build flash
   :compact:

Building on nucleo_l476rg with IKS01A2 shield
=============================================

The :ref:`x-nucleo-iks01a2` includes an LSM303AGR accelerometer which
supports the LIS2DH interface.  This shield may also be used on other
boards with Arduino headers.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/lis2dh
   :board: nucleo_l476rg
   :goals: build flash
   :shield: x_nucleo_iks01a2
   :compact:

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

.. code-block:: console

    Polling at 0.5 Hz
    #1 @ 12 ms: x -5.387328 , y 5.578368 , z -5.463744
    #2 @ 2017 ms: x -5.310912 , y 5.654784 , z -5.501952
    #3 @ 4022 ms: x -5.349120 , y 5.692992 , z -5.463744

   <repeats endlessly every 2 seconds>

Part 3

한국어 전문 번역

개요

이 sample application은 LIS2DH sensor 또는 호환되는 LS2DH12, LIS3DH, LSM303DLHC sensor에서 accelerometer data를 주기적으로 읽어 console에 표시합니다.

요구 사항

이 sample은 3D digital-output motion sensor를 통합한 ST MEMS system-in-package인 LIS2DH를 사용합니다.

참고 자료

LIS2DH motion sensor에 관한 자세한 내용은 ST LIS2DH 제품 페이지를 참조하십시오.

빌드 및 실행

LIS2DH2 또는 호환 sensor는 Zephyr가 지원하는 여러 board와 shield에서 사용할 수 있습니다.

  • actinius_icarus
  • thingy52_nrf52832
  • stm32f3_disco board
  • x-nucleo-iks01a2 shield

Flash 방법과 acceleration data가 표시되는 console 접속 절차는 각 board 문서를 참조하십시오.

actinius_icarus에서 빌드

actinius_icarus에는 LIS2DH interface를 지원하는 ST LIS2DH12 accelerometer가 포함되어 있습니다.

west build -b actinius_icarus samples/sensor/lis2dh
west flash

IKS01A2 shield를 장착한 nucleo_l476rg에서 빌드

x-nucleo-iks01a2에는 LIS2DH interface를 지원하는 LSM303AGR accelerometer가 포함되어 있습니다. 이 shield는 Arduino header가 있는 다른 board에서도 사용할 수 있습니다.

west build -b nucleo_l476rg --shield x_nucleo_iks01a2 samples/sensor/lis2dh
west flash

출력 예

 Polling at 0.5 Hz
 #1 @ 12 ms: x -5.387328 , y 5.578368 , z -5.463744
 #2 @ 2017 ms: x -5.310912 , y 5.654784 , z -5.501952
 #3 @ 4022 ms: x -5.349120 , y 5.692992 , z -5.463744

<repeats endlessly every 2 seconds>

Sample은 0.5 Hz, 즉 2초 간격으로 polling하며 sample 번호, 시작 후 경과 시간과 x·y·z 세 축 acceleration 값을 계속 출력합니다.

Source

출처

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