samples/boards/sensortile_box_pro/sensors-on-board/README.html · samples/boards/sensortile_box_pro/sensors-on-board/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · ST Sensors Pro

SensorTile.box Pro On-board Sensors

HTS221·LPS22DF·LSM6DSV16X·LIS2DU12 값을 USB CDC로 확인합니다.

Official pathsamples/boards/sensortile_box_pro/sensors-on-board/README.html
Source filesamples/boards/sensortile_box_pro/sensors-on-board/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

Device path, minicom 설정과 Pro dashboard 출력을 설명합니다.

Sensors

4 on-board devices

TTY

ttyUSBx · ttyACMx

Period

2 seconds

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 97050972F904F0BDF3AEFD205F982DBF206EF442E960C4FC8A899DAB5EACA1FC
.. _sensortile_box_pro_sample_sensors:

ST SensorTile.box Pro on-board sensors test
###########################################

Overview
********
This sample provides an example of how to read sensors data
from the SensorTile.box Pro board.

This sample enables all sensors of SensorTile.box Pro board, and then
periodically reads and displays data on the console from the following
sensors:

- HTS221: ambient temperature and relative humidity
- LPS22DF: ambient temperature and atmospheric pressure
- LSM6DSV16X: 6-Axis acceleration and angular velocity
- LIS2DU12: 3-Axis acceleration

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

The application requires a SensorTile.box Pro board connected to the PC
through USB. The board shows up as a USB CDC class standard device.

References
**********

- :ref:`sensortile_box_pro_board`

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

Build and flash the sample in the following way:

.. zephyr-app-commands::
    :zephyr-app: samples/boards/sensortile_box_pro/sensors-on-board
    :board: sensortile_box_pro
    :goals: build flash

Please note that flashing the board requires a few preliminary steps described
in :ref:`sensortile_box_pro_board`.

Then, power cycle the board by disconnecting and reconnecting the USB cable.
Run your favorite terminal program to listen for output.

.. code-block:: console

   $ minicom -D <tty_device> -b 115200

Replace :code:`<tty_device>` with the correct device path automatically created on
the host after the SensorTile.box Pro board gets connected to it,
usually :code:`/dev/ttyUSBx` or :code:`/dev/ttyACMx` (with x being 0, 1, 2, ...).
The ``-b`` option sets baud rate ignoring the value from config.

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

The sample code outputs sensors data on the SensorTile.box Pro console.

 .. code-block:: console

    SensorTile.box Pro dashboard

    HTS221: Temperature: 26.4 C
    HTS221: Relative Humidity: 60.5%
    LPS22DF: Temperature: 28.4 C
    LPS22DF: Pressure:99.694 kpa
    LSM6DSV16X: Accel (m.s-2): x: -0.158, y: 0.158, z: 9.811
    LSM6DSV16X: GYro (dps): x: 0.003, y: 0.000, z: -0.005
    LIS2DU12: Accel (m.s-2): x: -0.756, y: -0.249, z: -9.629
    1:: lps22df trig 199
    1:: lsm6dsv16x acc trig 836
    1:: lsm6dsv16x gyr trig 836
    1:: lis2mdl trig 402
    1:: lis2du12 trig 1589

    <repeats endlessly every 2s>

Part 3

한국어 전문 번역

개요

SensorTile.box Pro board에서 sensor data를 읽는 방법을 보여주는 sample입니다. Board의 모든 sensor를 활성화한 다음 다음 sensor의 data를 주기적으로 읽어 console에 표시합니다.

  • HTS221: ambient temperature와 relative humidity
  • LPS22DF: ambient temperature와 atmospheric pressure
  • LSM6DSV16X: 6-axis acceleration과 angular velocity
  • LIS2DU12: 3-axis acceleration

요구 사항

USB를 통해 PC에 연결한 SensorTile.box Pro board가 필요합니다. Board는 표준 USB CDC class device로 나타납니다.

참고 문서

  • SensorTile.box Pro board 문서

Build와 실행

다음과 같이 sample을 build하고 flash합니다.

# From the root of the zephyr repository
west build -b sensortile_box_pro samples/boards/sensortile_box_pro/sensors-on-board
west flash

Board를 flash하려면 SensorTile.box Pro board 문서에 설명된 몇 가지 사전 단계가 필요합니다.

USB cable을 분리했다 다시 연결해 board의 전원을 껐다 켭니다. 원하는 terminal program을 실행해 출력을 수신합니다.

$ minicom -D <tty_device> -b 115200

<tty_device>를 SensorTile.box Pro를 host에 연결했을 때 자동으로 생성된 올바른 device path로 바꿉니다. 보통 /dev/ttyUSBx 또는 /dev/ttyACMx이며 x는 0, 1, 2 등입니다. -b option은 configuration 값을 무시하고 baud rate를 설정합니다.

Sample 출력

Sample code는 SensorTile.box Pro console에 sensor data를 출력합니다.

SensorTile.box Pro dashboard

HTS221: Temperature: 26.4 C
HTS221: Relative Humidity: 60.5%
LPS22DF: Temperature: 28.4 C
LPS22DF: Pressure:99.694 kpa
LSM6DSV16X: Accel (m.s-2): x: -0.158, y: 0.158, z: 9.811
LSM6DSV16X: GYro (dps): x: 0.003, y: 0.000, z: -0.005
LIS2DU12: Accel (m.s-2): x: -0.756, y: -0.249, z: -9.629
1:: lps22df trig 199
1:: lsm6dsv16x acc trig 836
1:: lsm6dsv16x gyr trig 836
1:: lis2mdl trig 402
1:: lis2du12 trig 1589

<repeats endlessly every 2s>

Source

출처

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