Part 1
요약·해설
여섯 sensor, DIL24 LIS2DE12, I2C source path와 exact trigger output을 보존합니다.
6 sensors
DIL24
LIS2DE12
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
61AED75108C7E97CAB14C0E594A177BEC43A7CE298E133AB55404B281087C377
.. zephyr:code-sample:: x-nucleo-iks01a3-std
:name: X-NUCLEO-IKS01A3 shield - Standard (Mode 1)
:relevant-api: sensor_interface
Interact with all the sensors of an X-NUCLEO-IKS01A3 shield using Standard mode.
Overview
********
This sample is provided as an example to test the X-NUCLEO-IKS01A3 shield
configured in Standard mode (Mode 1).
Please refer to :ref:`x-nucleo-iks01a3` for more info on this configuration.
This sample enables all sensors of a X-NUCLEO-IKS01A3 shield, and then
periodically reads and displays data from the shield sensors:
- HTS221: ambient temperature and relative humidity
- LPS22HH ambient temperature and atmospheric pressure
- LIS2MDL 3-Axis magnetic field intensity
- LIS2DW12 3-Axis acceleration
- LSM6DSO 6-Axis acceleration and angular velocity
- STTS751 temperature sensor
Requirements
************
This sample communicates over I2C with the X-NUCLEO-IKS01A3 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). See for example the :ref:`nucleo_f401re_board` board
source code:
- :file:`$ZEPHYR_BASE/boards/arm/nucleo_f401re/nucleo_f401re.dts`
- :file:`$ZEPHYR_BASE/boards/arm/nucleo_f401re/pinmux.c`
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 sensors multiple instances are not supported.
References
**********
- X-NUCLEO-IKS01A3: https://www.st.com/en/ecosystems/x-nucleo-iks01a3.html
DIL24 socket
************
In addition to sensors on board it is possible to place any other compatible
sensor on DIL24 socket. The sample is written in such a way that, if sensor is
not present, it will just be skipped.
List of sensors currently supported on DIL24 by this sample:
- LIS2DE12
Building and Running
********************
This sample runs with X-NUCLEO-IKS01A3 stacked on any board with a matching
Arduino connector. For this example, we use a :ref:`nucleo_f401re_board` board.
.. zephyr-app-commands::
:zephyr-app: samples/shields/x_nucleo_iks01a3/standard/
:host-os: unix
:board: nucleo_f401re
:goals: build
:compact:
Sample Output
=============
.. code-block:: console
X-NUCLEO-IKS01A3 sensor dashboard
HTS221: Temperature: 27.5 C
HTS221: Relative Humidity: 27.0%
LPS22HH: Temperature: 27.3 C
LPS22HH: Pressure:99.150 kpa
STTS751: Temperature: 27.6 C
LIS2MDL: Magn (gauss): x: -0.445, y: -0.054, z: -0.066
LIS2MDL: Temperature: 26.8 C
LIS2DW12: Accel (m.s-2): x: -0.413, y: 0.077, z: 10.337
LSM6DSO: Accel (m.s-2): x: 0.133, y: -0.133, z: 10.102
LSM6DSO: GYro (dps): x: 0.000, y: -0.006, z: -0.058
1:: lis2mdl trig 208
1:: lps22hh trig 214
1:: lsm6dso acc trig 426
1:: lsm6dso gyr trig 426
<updated endlessly every 2 seconds>
Part 3
한국어 전문 번역
개요
X-NUCLEO-IKS01A3 shield를 Standard mode(Mode 1)로 구성해 모든 onboard sensor를 독립적으로 읽는 sample입니다. Mode 1 configuration은 shield 문서를 참조합니다.
- HTS221: ambient temperature와 relative humidity
- LPS22HH: ambient temperature와 atmospheric pressure
- LIS2MDL: 3-axis magnetic field intensity
- LIS2DW12: 3-axis acceleration
- LSM6DSO: 6-axis acceleration과 angular velocity
- STTS751: temperature
요구 사항
Arduino connector가 있는 board에 shield를 쌓고 I2C로 통신합니다. Arduino I2C용 pin muxing과 devicetree를 모두 구성해야 하며, 원문의 예제 source path는 $ZEPHYR_BASE/boards/arm/nucleo_f401re/nucleo_f401re.dts와 $ZEPHYR_BASE/boards/arm/nucleo_f401re/pinmux.c입니다.
Sensor multiple instance가 지원되지 않으므로 disco_l475_iot1처럼 동일 sensor를 이미 지원하는 board에서는 사용할 수 없습니다.
참고 자료
DIL24 socket
Onboard sensor 외에도 호환 sensor를 DIL24 socket에 꽂을 수 있습니다. Sample은 optional sensor가 존재하지 않으면 오류로 중단하지 않고 그 sensor를 건너뜁니다. 현재 이 sample이 DIL24에서 지원하는 sensor는 LIS2DE12입니다.
빌드 및 실행
Matching Arduino connector가 있는 board에서 실행할 수 있으며, 다음은 Unix host에서 nucleo_f401re용으로 build하는 공식 command입니다.
west build -b nucleo_f401re samples/shields/x_nucleo_iks01a3/standard/
출력 예
X-NUCLEO-IKS01A3 sensor dashboard
HTS221: Temperature: 27.5 C
HTS221: Relative Humidity: 27.0%
LPS22HH: Temperature: 27.3 C
LPS22HH: Pressure:99.150 kpa
STTS751: Temperature: 27.6 C
LIS2MDL: Magn (gauss): x: -0.445, y: -0.054, z: -0.066
LIS2MDL: Temperature: 26.8 C
LIS2DW12: Accel (m.s-2): x: -0.413, y: 0.077, z: 10.337
LSM6DSO: Accel (m.s-2): x: 0.133, y: -0.133, z: 10.102
LSM6DSO: GYro (dps): x: 0.000, y: -0.006, z: -0.058
1:: lis2mdl trig 208
1:: lps22hh trig 214
1:: lsm6dso acc trig 426
1:: lsm6dso gyr trig 426
<updated endlessly every 2 seconds>
여섯 onboard sensor의 environment·magnetic·acceleration·gyroscope 값과 네 trigger count를 2초마다 갱신합니다. 원문 output의 GYro 표기는 exact source 보존을 위해 수정하지 않았습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.