Part 1
요약·해설
Arduino I2C 설정, multiple-instance 제한과 exact dashboard output을 보존합니다.
HTS221 · LPS25HB
LIS3MDL · LSM6DSL
2 seconds
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
CFF34EA08BE2946012E98C12A3ED4B5F90891DB071B6346C17F04DB7B0DEADD0
.. zephyr:code-sample:: x-nucleo-iks01a1
:name: X-NUCLEO-IKS01A1 shield
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A1 shield.
Overview
********
This sample enables all sensors of a X-NUCLEO-IKS01A1 shield, and then
periodically reads and displays data from the shield sensors:
- HTS221: Temperature and humidity
- LPS25HB: Atmospheric pressure
- LIS3MDL: 3-axis Magnetic field intensity
- LSM6DSL: 3-Axis Acceleration
Requirements
************
This sample communicates over I2C with the X-NUCLEO-IKS01A1 shield
stacked on a board with an Arduino connector. The board's I2C must be
configured for the I2C Arduino connector (both for pin muxing
and devicetree).
Please note that this sample can't be used with boards already supporting
one of the sensors available on the shield (such as disco_l475_iot1) as zephyr
does not yet support sensors multiple instances.
References
**********
-X-NUCLEO-IKS01A1: https://www.st.com/en/ecosystems/x-nucleo-iks01a1.html
Building and Running
********************
This sample runs with X-NUCLEO-IKS01A1 stacked on any board with a matching
Arduino connector. For this example, we use a :ref:`nucleo_f429zi_board` board.
.. zephyr-app-commands::
:zephyr-app: samples/shields/x_nucleo_iks01a1
:board: nucleo_f429zi
:goals: build
:compact:
Sample Output
=============
.. code-block:: console
X-NUCLEO-IKS01A1 sensor dashboard
HTS221: Temperature:29.1 C
HTS221: Relative Humidity:46.0%
LPS25HB: Pressure:100.0 kpa
LIS3MDL: Magnetic field (gauss): x: 0.1, y: -0.4, z: 0.4
LSM6DS0: Acceleration (m.s-2): x: -0.0, y: -0.1, z: 9.7
<updated endlessly every 2 seconds>
Part 3
한국어 전문 번역
개요
X-NUCLEO-IKS01A1 shield의 모든 sensor를 활성화하고 주기적으로 읽어 값을 표시하는 sample입니다.
- HTS221: temperature와 humidity
- LPS25HB: atmospheric pressure
- LIS3MDL: 3-axis magnetic field intensity
- LSM6DSL: 3-axis acceleration
요구 사항
Sample은 Arduino connector가 있는 board 위 X-NUCLEO-IKS01A1 shield와 I2C로 통신합니다. Board의 pin mux와 devicetree에서 Arduino connector용 I2C가 모두 구성되어야 합니다.
Zephyr 3.7.0은 sensor multiple instance를 아직 지원하지 않으므로 disco_l475_iot1처럼 shield sensor 중 하나를 이미 내장한 board에서는 이 sample을 사용할 수 없습니다.
참고 자료
빌드 및 실행
Matching Arduino connector가 있는 어떤 board에서도 실행할 수 있습니다. 아래 예에서는 nucleo_f429zi를 사용합니다.
west build -b nucleo_f429zi samples/shields/x_nucleo_iks01a1
출력 예
X-NUCLEO-IKS01A1 sensor dashboard
HTS221: Temperature:29.1 C
HTS221: Relative Humidity:46.0%
LPS25HB: Pressure:100.0 kpa
LIS3MDL: Magnetic field (gauss): x: 0.1, y: -0.4, z: 0.4
LSM6DS0: Acceleration (m.s-2): x: -0.0, y: -0.1, z: 9.7
<updated endlessly every 2 seconds>
Dashboard는 temperature, relative humidity, pressure, magnetic field의 x·y·z 성분과 acceleration의 x·y·z 성분을 출력하고 2초마다 계속 갱신합니다. 원문의 sensor 목록에는 LSM6DSL이지만 sample output label은 LSM6DS0로 적혀 있어 그대로 보존했습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.