Part 1
요약·해설
Devicetree alias 구성, board build와 LIS2DH 측정 출력의 전체 흐름을 설명합니다.
Axes
X · Y · Z
Sensors
Up to 10
Unit
m/s²
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
원문 SHA-256
3C1F2970880FF1C3852A70084201B971293EFCE60C8E9FD29033361C2F2CF262
.. _accel_polling:
Generic 3-Axis accelerometer polling sample
###########################################
Overview
********
This sample application demonstrates how to use 3-Axis accelerometers.
Building and Running
********************
This sample supports up to 10 3-Axis accelerometers. Each accelerometer needs
to be aliased as ``accelN`` where ``N`` goes from ``0`` to ``9``. For example:
.. code-block:: devicetree
/ {
aliases {
accel0 = &lis2dh;
};
};
Make sure the aliases are in devicetree, then build and run with:
.. zephyr-app-commands::
:zephyr-app: samples/sensor/accel_polling
:board: <board to use>
:goals: build flash
:compact:
Sample Output
=============
.. code-block:: console
lis2dh@19 [m/s^2]: ( -6.013728, -3.064320, 7.277760)
lis2dh@19 [m/s^2]: ( -6.128640, -3.026016, 7.201152)
lis2dh@19 [m/s^2]: ( -6.090336, -3.064320, 7.162848)
lis2dh@19 [m/s^2]: ( -6.128640, -3.026016, 7.354368)
lis2dh@19 [m/s^2]: ( -6.166944, -3.102624, 7.277760)
lis2dh@19 [m/s^2]: ( -6.128640, -2.987712, 7.277760)
lis2dh@19 [m/s^2]: ( -6.052032, -2.987712, 7.277760)
lis2dh@19 [m/s^2]: ( -6.166944, -2.987712, 7.239456)
lis2dh@19 [m/s^2]: ( -6.090336, -3.026016, 7.201152)
Part 3
한국어 전문 번역
개요
이 sample application은 3축 accelerometer를 사용하는 방법을 보여 줍니다.
빌드 및 실행
이 sample은 3축 accelerometer를 최대 10개까지 지원합니다. 각 accelerometer에는 accelN 형식의 alias가 필요하며, N에는 0부터 9까지의 번호가 들어갑니다. 예:
/ {
aliases {
accel0 = &lis2dh;
};
};
Alias가 Devicetree에 정의되어 있는지 확인한 다음 다음 명령으로 build하고 실행합니다.
west build -b <board to use> samples/sensor/accel_polling
west flash
출력 예
lis2dh@19 [m/s^2]: ( -6.013728, -3.064320, 7.277760)
lis2dh@19 [m/s^2]: ( -6.128640, -3.026016, 7.201152)
lis2dh@19 [m/s^2]: ( -6.090336, -3.064320, 7.162848)
lis2dh@19 [m/s^2]: ( -6.128640, -3.026016, 7.354368)
lis2dh@19 [m/s^2]: ( -6.166944, -3.102624, 7.277760)
lis2dh@19 [m/s^2]: ( -6.128640, -2.987712, 7.277760)
lis2dh@19 [m/s^2]: ( -6.052032, -2.987712, 7.277760)
lis2dh@19 [m/s^2]: ( -6.166944, -2.987712, 7.239456)
lis2dh@19 [m/s^2]: ( -6.090336, -3.026016, 7.201152)
각 괄호의 세 값은 차례로 X·Y·Z 축 가속도이며 단위는 m/s²입니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.