The Adafruit Precision 9-DoF (Degrees of Freedom) LIS3MDL + LSM6DSOX is a versatile and high-precision sensor module that combines a 3-axis accelerometer and a 3-axis magnetometer. This sensor is ideal for applications requiring motion sensing, orientation, and magnetic field measurements. With its low noise and high accuracy, the module is well-suited for projects in robotics, navigation, gesture recognition, and more. It is also compatible with popular development platforms such as Arduino and Raspberry Pi, allowing for easy integration into a wide range of projects.
Accelerometer (LSM6DSOX):
Magnetometer (LIS3MDL):
Operating Voltage:
Communication:
Operating Temperature Range:
Pin Number | Name | Description |
---|---|---|
1 | VIN | Supply voltage (2.5V to 5.5V) |
2 | GND | Ground |
3 | SCL | I2C clock (also SPI clock) |
4 | SDA | I2C data (also SPI data input) |
5 | SDO/SA0 | SPI data output (also I2C address selection) |
6 | CS | SPI chip select (active low) |
7 | INT1 | Interrupt 1 (configurable) |
8 | INT2 | Interrupt 2 (configurable) |
To use the Adafruit Precision 9-DoF sensor with an Arduino UNO, follow these steps:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM6DSOX.h>
#include <Adafruit_LIS3MDL.h>
// Create sensor instances
Adafruit_LSM6DSOX sox;
Adafruit_LIS3MDL mdl;
void setup() {
Serial.begin(115200);
// Initialize the sensors
if (!sox.begin_I2C()) {
Serial.println("Failed to find LSM6DSOX chip");
while (1) { delay(10); }
}
if (!mdl.begin_I2C()) {
Serial.println("Failed to find LIS3MDL chip");
while (1) { delay(10); }
}
Serial.println("LSM6DSOX and LIS3MDL sensors found!");
}
void loop() {
// Read accelerometer and magnetometer values
sensors_event_t accel, gyro, mag, temp;
sox.getEvent(&accel, &gyro, &temp);
mdl.getEvent(&mag);
// Print the values to the Serial Monitor
Serial.print("Accel X: "); Serial.print(accel.acceleration.x); Serial.print(" m/s^2");
Serial.print(" Y: "); Serial.print(accel.acceleration.y); Serial.print(" m/s^2");
Serial.print(" Z: "); Serial.print(accel.acceleration.z); Serial.println(" m/s^2");
Serial.print("Mag X: "); Serial.print(mag.magnetic.x); Serial.print(" uT");
Serial.print(" Y: "); Serial.print(mag.magnetic.y); Serial.print(" uT");
Serial.print(" Z: "); Serial.print(mag.magnetic.z); Serial.println(" uT");
delay(100);
}
Q: Can I use this sensor with a 3.3V system? A: Yes, the sensor can operate at voltages as low as 2.5V.
Q: How do I change the I2C address? A: The I2C address can be changed by connecting the SDO/SA0 pin to either ground or VIN.
Q: What is the maximum sampling rate? A: The accelerometer can sample up to 6.66 kHz, and the magnetometer up to 155 Hz.
For further assistance, consult the Adafruit support forums or the community resources available for your development platform.