Datasheet
Python & CircuitPython
It's easy to use the LSM9DS1 sensor with Python or CircuitPython, and the Adafruit CircuitPython
LSM9DS1 (https://adafru.it/C5b) module. This module allows you to easily write Python code that reads the
accelerometer, magnetometer, and gyroscope from the sensor.
You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python
thanks to Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN).
CircuitPython Microcontroller Wiring
First wire up a LSM9DS1 to your board exactly as shown on the previous pages for Arduino. You can use either I2C or
SPI wiring, although it's recommended to use I2C for simplicity. Here's an example of wiring a Feather M0 to the sensor
with an I2C connection:
Board 3V to sensor VIN
Board GND to sensor GND
Board SCL to sensor SCL
Board SDA to sensor SDA
And an example of a Feather M0 wired with hardware SPI:
Board 3V to sensor VIN
Board GND to sensor GND
Board SCK to sensor SCL
Board MOSI to sensor SDA
Board MISO to sensor SDOAG AND sensor
SDOM
Board D5 to sensor CSAG
Board D6 to sensor CSM
Python Computer Wiring
Since there's
dozens
of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms,
please visit the guide for CircuitPython on Linux to see whether your platform is supported (https://adafru.it/BSN).
Here's the Raspberry Pi wired with I2C:
© Adafruit Industries
https://learn.adafruit.com/adafruit-lsm9ds1-accelerometer-plus-gyro-plus-
magnetometer-9-dof-breakout
Page 16 of 23










