Magnetic Compass LIS3MDL(I2C)
Jump to navigation
Jump to search
File:TArduinoLIS3MDLMagneticCompass.png
Summary
LIS3MDL 3-axis magnetic compass with I²C interface for detecting magnetic fields and orientation.
Description
The **LIS3MDL Magnetic Compass** measures the X, Y, and Z components of magnetic fields. It supports configurable sample rates, full-scale range, power modes, and self-test functionality. Temperature compensation can be enabled, and performance modes for XY and Z axes can be individually set. The sensor communicates via I²C and can be reset or synchronized using a clock input.
Diagram:
Properties
- Enabled – Enables or disables the compass.
- Fast Rate (boolean) – Enables faster measurement rates.
- Full Scale Range (Gauss) – Measurement range (default 4 Gauss).
- Low Power Mode (boolean) – Reduces power consumption.
- Power Down (boolean) – Puts sensor in power-down mode.
- Sample Rate (Hz) – Frequency of measurements (default 20 Hz).
- Self Test (boolean) – Enables self-test mode.
- Temperature Compensation (boolean) – Enables compensation for temperature variations.
- XY Performance Mode – Low, Medium, High, UltraHigh.
- Z Performance Mode – Low, Medium, High, UltraHigh.
- Address – I²C address.
Pins
Input Pins
- Reset (clock) – Resets the sensor.
- Clock – Sampling clock input.
Output Pins
- X (analog) – X-axis magnetic field output.
- Y (analog) – Y-axis magnetic field output.
- Z (analog) – Z-axis magnetic field output.
- Sensor (i2c) – I²C interface for communication and configuration.
Categories
- File:TArduinoDigitalCategory.png Category Digital – Digital sensors and interfaces.
- File:TArduinoI2CCategory.png Category I2C – I²C-enabled devices.
- File:TArduinoSensorCategory.png Category Sensors – Magnetic and orientation sensors.