STMicroelectronics LIS2MDL Element

The LIS2MDL element is used to measure magnetic fields. This element is for using the STMicroelectronics LIS2MDL magnetometer sensor, which is featured on the X-NUCLEO-IKS01A3 environmental sensor expansion board.

The LIS2MDL 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.

Properties

The following properties can be changed for the LIS2MDL element:

Name

The name of the element.

I2C Driver Instance

The I2C bus used to communicate with the sensor.

I2C Address

The I2C address the element sends data to. Verify which I2C address the sensor is using by checking its schematics.

Output Data Rate

The data rate for the magnetometer to sample readings. This includes the following options:

  • 10 Hz (default)
  • 20 Hz
  • 50 Hz
  • 100 Hz

Triggers

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

Triggered

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

Magnetic Field Read

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

X Magnetic Field Read

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

Y Magnetic Field Read

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

Z Magnetic Field Read

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

Abilities

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

Trigger

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

Read Magnetic Field (MG)

Read the magnetometer’s data in MG.

Read X Magnetic Field (MG)

Read the magnetometer’s x-axis data.

Read Y Magnetic Field (MG)

Read the magnetometer’s y-axis data.

Read Z Magnetic Field (MG)

Read the magnetometer’s z-axis data.