LIS3MDL Magnetometer Sensor
R2026bMeasure magnetic field strength and temperature from LIS3MDL Magnetometer sensor
Since R2025a
Libraries:
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
MBED Based Sensors
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32L475VG-Discovery (B-L475E-IOT01A)
Description
The LIS3MDL Magnetometer Sensor block outputs the values of magnetic field strength along x-, y- and z- axes as measured by the LIS3MDL Magnetometer sensor connected to STM32 processor. The block also outputs the temperature as read by the LIS3MDL Magnetometer sensor.
Examples
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"stmnucleosensorslib/LIS3MDL Magnetometer Sensor"
"stm32l475vglib/LIS3MDL Magnetometer Sensor"
Example: add_block("stmnucleosensorslib/LIS3MDL Magnetometer Sensor","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2025a
