1.. _lsm6dsl: 2 3LSM6DSL: IMU sensor Monitor 4########################### 5 6Overview 7******** 8This sample sets the LSM6DSL accelerometer and gyroscope to 104Hz 9and enable a trigger on data ready. It displays on the console the 10values for accelerometer and gyroscope, plus optionally the values of 11any magnetometer or pressure sensor attached to it (sensorhub function). 12 13 14Requirements 15************ 16 17This sample uses the LSM6DSL sensor controlled using the I2C or SPI interface. 18It has been tested on both :ref:`96b_argonkey` and disco_l475_iot1 board. 19 20References 21********** 22 23- LSM6DSL http://www.st.com/en/mems-and-sensors/lsm6dsl.html 24 25Building and Running 26******************** 27 28 This project outputs sensor data to the console. It requires an LSM6DSL 29 sensor, which is present on both the :ref:`96b_argonkey` and disco_l475_iot1 board. 30 31Building on ArgonKey board 32========================== 33 34.. zephyr-app-commands:: 35 :zephyr-app: samples/sensor/lsm6dsl 36 :host-os: unix 37 :board: 96b_argonkey 38 :goals: build 39 :compact: 40 41Building on disco_l475_iot1 board 42================================= 43 44.. zephyr-app-commands:: 45 :zephyr-app: samples/sensor/lsm6dsl 46 :host-os: unix 47 :board: disco_l475_iot1 48 :goals: build 49 :compact: 50 51Building on nrf52840dk_nrf52840 board with x-nucleo-iks01a2 shield 52================================================================== 53 54.. zephyr-app-commands:: 55 :zephyr-app: samples/sensor/lsm6dsl 56 :host-os: unix 57 :board: nrf52840dk_nrf52840 58 :shield: x_nucleo_iks01a2 59 :goals: build 60 :compact: 61 62Sample Output 63============= 64 65.. code-block:: console 66 67 LSM6DSL sensor samples: 68 69 accel (-3.184000 -0.697000 9.207000) m/s2 70 gyro (0.065000 -0.029000 0.002000) dps 71 magn (-0.042000 0.294000 -0.408000) gauss 72 - (0) (trig_cnt: 190474) 73 74 <repeats endlessly every 2 seconds> 75 76.. note:: The magn row is displayed only when running sample onto 96b_argonkey board, where a magnetometer is connected to LSM6DSL. 77