STMicroelectronics LSM6DSM Element

The LSM6DSM element is used to measure acceleration, angular velocity, and temperature. This element is for using the STMicroelectronics LSM6DSM three-axis accelerometer and gyroscope.

The LSM6DSM is a sensor element that can be imported into the Element Toolbox through the Add Element Add Element button located in the toolbox from the Embedded tab. SensorTile projects have this element imported by default.

Properties

The following properties can be changed for the LSM6DSM element:

Name

The name of the element.

Communication Mode

The mode the sensor uses to transmit data: SPI or I2C.

I2C Driver Instance

The I2C bus used to communicate with the sensor.

SPI Driver Instance

The SPI bus used to communicate with the sensor.

GPIO Driver Instance

The GPIO driver instance number to use.

Chip Select Pin

The GPIO pin used to toggle the chip select pin.

3 Wire SPI Mode

The mode of the sensor’s SPI driver: 3 wire or 4 wire. If 3 wire mode is enabled, the MOSI and MISO wires are combined in half-duplex communication.

I2C Address

The I2C address the element sends data to.

Accel Output Data Rate

The rate of output the accelerometer driver runs at in Hz. This element includes the following data rate options:

  • Power Off
  • 12.5 Hz (default)
  • 26 Hz
  • 52 Hz
  • 104 Hz
  • 208 Hz
  • 416 Hz
  • 833 Hz
  • 1.66 kHz
  • 3.33 kHz
  • 6.66 kHz
  • 1.6 Hz

Gyro Output Data Rate

The rate of output the gyroscope driver runs at in Hz. This element includes the following data rate options:

  • Power Off
  • 12.5 Hz (default)
  • 26 Hz
  • 52 Hz
  • 104 Hz
  • 208 Hz
  • 416 Hz
  • 833 Hz
  • 1.66 kHz
  • 3.33 kHz
  • 6.66 kHz
  • 1.6 Hz

Accelerometer Full Scale

The accelerometer’s sensitivity to linear acceleration in gs. This element includes the following full scale options:

  • 2 g (default)
  • 4 g
  • 8 g
  • 16 g

Gyroscope Full Scale

The gyroscope’s sensitivity to magnetic induction in dps. This element includes the following full scale options:

  • 125 dps
  • 250 dps
  • 500 dps
  • 1000 dps
  • 2000 dps (default)

Triggers

The following triggers are available to execute events from within the LSM6DSM element:

Triggered

Execute an event when the source element connected to the LSM6DSM triggers.

X Acceleration Read

Execute an event when the accelerometer’s x-axis value is read.

Y Acceleration Read

Execute an event when the accelerometer’s y-axis value is read.

Z Acceleration Read

Execute an event when the accelerometer’s z-axis value is read.

Acceleration Read

Execute an event when the accelerometer’s data is read.

X Rotation Speed Read

Execute an event when the gyroscope’s x-axis rotation speed (in mDPS) is read.

Y Rotation Speed Read

Execute an event when the gyroscope’s y-axis rotation speed is read.

Z Rotation Speed Read

Execute an event when the gyroscope’s z-axis rotation speed is read.

Rotation Speed Read

Execute an event when the gyroscope’s rotation speed data is read.

Temperature Read

Execute an event when temperature data is read.

Abilities

The following abilities are available for the LSM6DSM element when its source element triggers:

Trigger

Trigger the element(s) that follow the LSM6DSM element.

Read X Acceleration

Read the accelerometer’s x-axis data in mGs.

Read Y Acceleration

Read the accelerometer’s y-axis data.

Read Z Acceleration

Read the accelerometer’s z-axis data.

Read Acceleration

Read the accelerometer’s x-, y-, and z-axis data.

Read X Rotation Speed

Read the gyroscope’s x-axis rotation speed data in mDPS.

Read Y Rotation Speed

Read the gyroscope’s y-axis rotation speed data.

Read Z Rotation Speed

Read the gyroscope’s z-axis rotation speed data.

Read Rotation Speed

Read the gyroscope’s x-, y-, and z-axis rotation speed data.

Read Temperature (°C)

Read the temperature data (in Celsius).