Datasheet
We suggest using this Adafruit_Sensor interface as shown in this demo, since it will let you swap sensors without
having to worry about units compatibility. Try twisting and moving the board around to see the sensors change value.
Library Reference
The library we have is simple and easy to use
You can create the Adafruit_LSM9DS1 object with:
I2C does not have pins, as they are fixed in hardware.
If you're using "hardware" SPI, you will have to wire up the pins as follows:
SCL -> SPI CLK
SDA -> SPI MOSI
SDO_AG & SDO_M -> SPI MISO (both together)
You can determine the hardware SPI pins for your Arduino here (https://adafru.it/d5h) Then pick two pins for the CS
lines
If you don't want to use the hardware SPI, you can also try the soft SPI capability, which is bitbanged. You can basically
use any pins you like!
Adafruit_LSM9DS1 lsm = Adafruit_LSM9DS1(); // i2c sensor
Adafruit_LSM9DS1 lsm = Adafruit_LSM9DS1(LSM9DS1_XGCS, LSM9DS1_MCS);
© Adafruit Industries
https://learn.adafruit.com/adafruit-lsm9ds1-accelerometer-plus-gyro-plus-
magnetometer-9-dof-breakout
Page 13 of 23










