# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/018/535/medium800/sensors_2021iso_ORIG.jpg?1406843844)

Add motion, direction and orientation sensing to your Arduino project with this all-in-one 9-DOF sensor. Inside the chip are three sensors, one is a classic 3-axis accelerometer, which can tell you which direction is down towards the Earth (by measuring gravity) or how fast the board is accelerating in 3D space. The other is a 3-axis magnetometer that can sense where the strongest magnetic force is coming from, generally used to detect magnetic north. The third is a 3-axis gyroscope that can measure spin and twist. By combining this data you can REALLY orient yourself.

![](https://cdn-learn.adafruit.com/assets/assets/000/018/588/medium800/sensors_2021quarter_ORIG.jpg?1407180495)

When we saw the new LSM9DS0 from ST micro we thought - wow this could really make for a great breakout, at a very nice price! Design your own activity or motion tracker with all the data... We spun up a breakout board and Flora breakout that has all the extra circuitry you'll want, depending on whether you are using it with the Adafruit Flora or an Arduino (or other microcontroller)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/537/medium800/sensors_2021kit_ORIG.jpg?1406843883)

The **breakout board** version of this sensor has both I2C and SPI interfaces. Attaching it to the Arduino is simple, power Vin and GND with 3-5VDC, and wire up I2C data on SCL and SDA, and you're ready to go! More advanced users can use SPI, our library has support for both. The breakout comes fully assembled and tested, with some extra header so you can use it on a breadboard. Four mounting holes make for a secure connection, and we put the popular power+data pins on one side, and the interrupt pins on the other side for a nice & compact breakout.

![](https://cdn-learn.adafruit.com/assets/assets/000/018/536/medium800/sensors_2020top_ORIG.jpg?1406843860)

The **Flora** version has just I2C interface for a super-small design. Attaching it to the FLORA is simple: line up the sensor so its adjacent to the SDA/SCL pins and sew conductive thread from the 3V, SDA, SCL and GND pins. They line up perfectly so you will not have any crossed lines. You can only connect one of these sensors to your FLORA, but you can connect other I2C sensors/outputs by using the set of SCL/SDA pins on the opposite side. # Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Pinouts

We have two versions of this sensor, a compact and sewable Flora sensor and also a more extensive breadboard-friendly breakout. They use the same chip sensor, of course, and the same firmware code. However there's some differences about the pinouts!

# Flora Sewable Version Pinouts
![](https://cdn-learn.adafruit.com/assets/assets/000/018/542/medium800/sensors_2020top_ORIG.jpg?1406844054)

## Power Pins
There's two power pins, 3V and GND. The 3V has to be regulated 'cleanly' from the Flora. There's no on-board polarity or regulation! The GND pin is the ground for both power and signal.  
  

## Data pins
Flora uses a chainable I2C data path for sensors, all the sensors share the same SCL and SDA pins. These pins have 10K pullups to 3V but they do not have level shifting so they are only for use with 3V logic boards such as Flora!  
# Breadboard-Friendly Breakout Version
![](https://cdn-learn.adafruit.com/assets/assets/000/018/541/medium800/sensors_pinout.jpg?1406844041)

## Power Pins
The sensor on the breakout requires 3V power. Since many customers have 5V microcontrollers like Arduino, we tossed a 3.3V regulator on the board. Its ultra-low dropout so you can power it from 3.3V-5V just fine.  

- **Vin** - this is the power pin. Since the chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **3V3** - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like  
- **GND** - common ground for power and logic

## I2C Pins

- **SCL** - I2C clock pin, connect to your microcontrollers I2C clock line. This pin is level shifted so you can use 3-5V logic, and there's a 10K pullup on this pin.  
- **SDA** - I2C data pin, connect to your microcontrollers I2C data line. This pin is level shifted so you can use 3-5V logic, and there's a 10K pullup on this pin.

## SPI Pins
If you're interested in using SPI to interface with the LSM9DS0, you can!  

- **SCL** - this is also the SPI clock pin, it's level shifted so you can use 3-5V logic input  
- **SDA** - this is also the SPI MOSI pin, it's level shifted so you can use 3-5V logic input
- **CSG** - this is the Gyro subchip Chip Select, it's level shifted so you can use 3-5V logic input
- **CSXM** - this is the Accelerometer & Magnetometer subchip Select, it's level shifted so you can use 3-5V logic input
- **SDOG** - this is the Gyro subchip MISO pin - it's 3V logic out, but can be read properly by 5V logic chips.
- **SDOXM** - this is the Accelerometer & Magnetometer subchip MISO pin - it's 3V logic out, but can be read properly by 5V logic chips.  

## Interrupt & Misc Pins
Since there's so many sensors in the LSM9DS0, there's quite a number of interrupt outputs.  

- **DEN** - this is a pin that can be used to dynamically enable/disable the Gyro. There's actually no documentation on it but it seems you can try it out by enabling the trigger with   
write8(GYROTYPE, 0x21, 0xC0);   
which will let you use DEN to turn on/off gyro output (level trigger). This pin is level shifted.  
- **INT1** & **INT2** - These are interrupts from the accelerometer/magnetometer subchip. We don't have specific library support for these so check the datasheet for what you can make these indicate. They are 3V-logic outputs
- **DRDY** - this is the Gyro subchip data ready output. We don't have specific library support for these so check the datasheet for how you can set the registers to enable this pin. It is a 3V-logic output.
- **INTG** - This is the interrupt from the Gyro subchip. We don't have specific library support for it so check the datasheet for what you can make it indicate. It is a 3V-logic output.

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Assembly

If you have the breadboard version of this sensor, you'll want to solder some header onto the sensor so it can be used in a breadboard. The Flora version does not require any extra assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/018/590/medium800/sensors_2021kit_ORIG.jpg?1407180576)

 
## Prepare the header strip:
Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down** ![sensors_header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/592/medium640/sensors_header.jpg?1407180618)

## Add the breakout board:
Place the breakout board over the pins so that the short pins poke through the breakout pads![sensors_place.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/593/medium640/sensors_place.jpg?1407180631)

 
## And Solder!
 Be sure to solder all pins for reliable electrical contact.  
  
Solder the longer power/data strip first  
  
_(For tips on soldering, be sure to check out our_ [_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._![sensors_solder1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/594/medium640/sensors_solder1.jpg?1407180653)

![sensors_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/595/medium640/sensors_solder2.jpg?1407180668)

![sensors_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/596/medium640/sensors_solder3.jpg?1407180678)

If you plan to use the interrupts and/or you want the board to sit flatter in a breadboard, solder up the other strip!

![sensors_solder4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/597/medium640/sensors_solder4.jpg?1407180686)

You're done! Check your solder joints visually and continue onto the next steps

![sensors_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/598/medium640/sensors_done.jpg?1407180744)

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Arduino Code

# Wiring for Flora
Flora uses conductive thread or aligator clips, connect up the 3V/SDA/SCL/GND pins to the matching pins in the north-west quarter of the Flora board. We suggest alligator clips to test, then sew in with thread once it works!  
![](https://cdn-learn.adafruit.com/assets/assets/000/018/549/medium800/sensors_9DOF-FLORA.jpg?1406847211)

# Wiring for Arduino
You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, just make sure it has I2C or SPI, then port the code - its pretty simple stuff!  
  
Let's start with just I2C interfacing since it requires the fewest # of wires:  
![](https://cdn-learn.adafruit.com/assets/assets/000/018/589/medium800/sensors_wiring.jpg?1407180531)

- Connect **Vin** to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V  
- Connect **GND** to common power/data ground
- Connect the **SCL** pin to the I2C clock **SCL** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A5** , on a Mega it is also known as **digital 21** and on a Leonardo/Micro, **digital 3**
- Connect the **SDA** pin to the I2C data **SDA** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A4** , on a Mega it is also known as **digital 20** and on a Leonardo/Micro, **digital 2**

# Download Arduino Libraries

To begin reading sensor data, you will need to download the&nbsp; **Adafruit LSM9DS0 library** and the **Adafruit Unified Sensor library** from the Arduino library manager.

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/497/medium800/sensors_1library_manager_menu.png?1574052023)

Search for the&nbsp; **Adafruit LSM9DS0&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/498/medium800/sensors_lsm9ds0.png?1574052090)

Search for the&nbsp; **Adafruit Unified Sensor&nbsp;** and install it (you may have to scroll down quite far to find it)

![](https://cdn-learn.adafruit.com/assets/assets/000/084/499/medium800/sensors_unified.png?1574052196)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

# Load Demo Sketch

Now you can open up **File-\>Examples-\>Adafruit\_LSM9DS0**** -\>lsm9doftest** and upload to your Arduino wired up to the sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/018/599/medium800/sensors_lsm9doftest.png?1407181134)

Warning: 

Then open up the Serial console at 9600 baud to read the raw data output in 'counts'. This is data directly from the sensor, and isn't in any particular units.

![](https://cdn-learn.adafruit.com/assets/assets/000/018/600/medium800/sensors_lsmrawout.png?1407181219)

This output is not terribly useful for most people - its simpler but does not have adjusted output units. Instead, we suggest the **sensorapi** demo. Upload that to the Arduino and open up the Serial console again.  
  
This time, you'll get the outputs in m/s\*s, gauss an degrees-per-second

![](https://cdn-learn.adafruit.com/assets/assets/000/018/601/medium800/sensors_sensorapi.png?1407181421)

We suggest using this Adafruit\_Sensor interface version, 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\_LSM9DS0** object with:  
```auto
Adafruit_LSM9DS0 lsm = Adafruit_LSM9DS0();  // i2c sensor
```

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\_XM & SDO\_G -\> SPI MISO (both together)

[You can determine the hardware SPI pins for your Arduino here](http://arduino.cc/en/Reference/SPI "Link: http://arduino.cc/en/Reference/SPI") Then pick two pins for the CS lines  
```auto
Adafruit_LSM9DS0 lsm = Adafruit_LSM9DS0(LSM9DS0_XM_CS, LSM9DS0_GYRO_CS);
```

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!

```auto
Adafruit_LSM9DS0 lsm = Adafruit_LSM9DS0(LSM9DS0_SCLK, LSM9DS0_MISO, LSM9DS0_MOSI, LSM9DS0_XM_CS, LSM9DS0_GYRO_CS);
```

# Begin!
To initialize the sensor, call **lsm.begin()** which will check the sensor can be found. It returns true/false depending on these checks. We suggest you wrap begin() in a statement that will check if the sensor was located:  
```auto
  if(!lsm.begin())
  {
    /* There was a problem detecting the LSM9DS0 ... check your connections */
    Serial.print(F("Ooops, no LSM9DS0 detected ... Check your wiring!"));
    while(1);
  }
```

# Set Ranges
These chips have tons of registers, we basically provide interface code for the most useful stuff, such as setting the range. Each subsensor has it's own range. Higher ranges have less precision but can measure larger movements!  
Set up the ranges with the **setup** functions:  
```auto
  // 1.) Set the accelerometer range
  lsm.setupAccel(lsm.LSM9DS0_ACCELRANGE_2G);
  //lsm.setupAccel(lsm.LSM9DS0_ACCELRANGE_4G);
  //lsm.setupAccel(lsm.LSM9DS0_ACCELRANGE_6G);
  //lsm.setupAccel(lsm.LSM9DS0_ACCELRANGE_8G);
  //lsm.setupAccel(lsm.LSM9DS0_ACCELRANGE_16G);
  
  // 2.) Set the magnetometer sensitivity
  lsm.setupMag(lsm.LSM9DS0_MAGGAIN_2GAUSS);
  //lsm.setupMag(lsm.LSM9DS0_MAGGAIN_4GAUSS);
  //lsm.setupMag(lsm.LSM9DS0_MAGGAIN_8GAUSS);
  //lsm.setupMag(lsm.LSM9DS0_MAGGAIN_12GAUSS);

  // 3.) Setup the gyroscope
  lsm.setupGyro(lsm.LSM9DS0_GYROSCALE_245DPS);
  //lsm.setupGyro(lsm.LSM9DS0_GYROSCALE_500DPS);
  //lsm.setupGyro(lsm.LSM9DS0_GYROSCALE_2000DPS);
```

Choose whichever range you like, after you begin() the sensor!

# Read data
Read data using the Adafruit\_Sensor API by first creating four events, one for each sub-sensor:  
```auto
sensors_event_t accel, mag, gyro, temp;
```

Then pass these into the **getEvent** function

```auto
lsm.getEvent(&accel, &mag, &gyro, &temp);
```

The data is snapshotted at once, so you can read and manage the data later.   
  
For the Accelerometer event you can read **accel.acceleration.x** , **accel.acceleration.y** or **accel.acceleration.z** which are in meters/second\*second.  
  
For the Magnetometer event you can read **mag.magnetic.x** , **mag.magnetic.y** or **mag.magnetic.z** which are in gauss.  
  
For the Gyro event you can read **gyro.gyro.x, gyro.gyro.y** or **gyro.gyro.z** , which are in degrees-per-second (dps)  
  
The temperature event data is in **temp.temperature** , in degrees C

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Python & CircuitPython

It's easy to use the LSM9DS0 sensor with Python or CircuitPython, and the&nbsp;[Adafruit CircuitPython LSM9DS0](https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0)&nbsp;module.&nbsp; This module allows you to easily write Python code that reads the accelerometer, magnetometer, and gyroscope&nbsp;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://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

# CircuitPython Microcontroller Wiring

First wire up a LSM9DS0 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** &nbsp;to&nbsp; **sensor VIN**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCL** &nbsp;to&nbsp; **sensor&nbsp;SCL**
- **Board SDA** &nbsp;to&nbsp; **sensor SDA**

![sensors_FeatherM0_LSM9DS0_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/059/464/medium640/sensors_FeatherM0_LSM9DS0_bb.jpg?1534779289)

And an example of a Feather M0 wired with hardware SPI:

- **Board 3V** &nbsp;to&nbsp; **sensor VIN**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCK** to&nbsp; **sensor&nbsp;SCL**
- **Board MOSI** to&nbsp; **sensor SDA**
- **Board MISO** to **sensor SDOG** AND **sensor SDOXM**
- **Board D5** to **sensor CSG**
- **Board D6** to **sensor CSXM**

![sensors_FeatherM0_LSM9DS0_SPI_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/333/medium640/sensors_FeatherM0_LSM9DS0_SPI_bb.jpg?1544216290)

# 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://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi 3V3** to **sensor VIN**
- **Pi GND** to **sensor GND**
- **Pi SCL** to **sensor SCL**
- **Pi SDA** to **sensor SDA**

![sensors_raspi_lsm9ds0_i2c_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/059/465/medium640/sensors_raspi_lsm9ds0_i2c_bb.jpg?1534779406)

Here's the Raspberry Pi wired with SPI:

- **Pi 3V3** to&nbsp; **sensor VIN**
- **Pi GND** &nbsp;to&nbsp; **sensor GND**
- **Pi SCLK** to&nbsp; **sensor&nbsp;SCL**
- **Pi MOSI** to&nbsp; **sensor SDA**
- **Pi MISO** to **sensor SDOG** AND **sensor SDOXM**
- **Pi GPIO5** to **sensor CSG**
- **Pi GPIO6** to **sensor CSXM**

![sensors_raspi_lsm9ds0_spi_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/067/335/medium640/sensors_raspi_lsm9ds0_spi_bb.jpg?1544216353)

# CircuitPython Installation of LSM9DS0 Library

You'll need to install the&nbsp;[Adafruit CircuitPython LSM9DS0](https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0)&nbsp;library on your CircuitPython board.&nbsp;&nbsp;

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](../../../../welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](../../../../welcome-to-circuitpython/circuitpython-libraries)&nbsp;for both express and non-express boards.

Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:

- **adafruit\_lsm9ds0.mpy**
- **adafruit\_bus\_device**

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_lsm9ds0.mpy,&nbsp;** and **&nbsp;adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

# Python Installation of LSM9DS0 Library

You'll need to install the Adafruit\_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `pip3 install adafruit-circuitpython-lsm9ds0`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

# CircuitPython & Python Usage

To demonstrate the usage of the sensor we'll initialize it and read the accelerometer, magnetometer,&nbsp;and&nbsp;more from the board's Python REPL.

Run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```auto
import board
import busio
import adafruit_lsm9ds0
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_lsm9ds0.LSM9DS0_I2C(i2c)
```

If you're connected using SPI, run the following code to initialise the SPI connection with the sensor:

```auto
import board
import busio
from digitalio import DigitalInOut, Direction
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
gcs = DigitalInOut(board.D5)
xmcs = DigitalInOut(board.D6)
sensor = adafruit_lsm9ds0.LSM9DS0_SPI(spi, xmcs, gcs)
```

Now you're ready to read values from the sensor using any of these properties:

- **acceleromter** &nbsp;-&nbsp;A 3-tuple of X, Y, Z axis accelerometer values in meters/second squared.
- **magnetometer** - A 3-tuple of X, Y, Z axis magnetometer values in gauss.
- **gyroscope** - A 3-tuple of X, Y, Z axis gyroscope values in degrees/second.
- **temperature** - The sensor temperature in degrees Celsius.

```auto
print('Acceleration (m/s^2): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(*sensor.accelerometer))
print('Magnetometer (gauss): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(*sensor.magnetometer))
print('Gyroscope (degrees/sec): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(*sensor.gyroscope))
print('Temperature: {0:0.3f}C'.format(sensor.temperature))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/048/917/medium800/sensors_Screen_Shot_2017-12-05_at_7.39.28_PM.png?1512531589)

In addition you can adjust some properties by getting and setting their values:

- **accel\_range** - The range of the accelerometer, should be a value of&nbsp;ACCELRANGE\_2G, ACCELRANGE\_4G, ACCELRANGE\_6G, ACCELRANGE\_8G, or ACCELRANGE\_16G from the adafruit\_lsm9ds0 module. &nbsp;The default is 2G.
- **mag\_gain** - The gain of the magnetometer, should be a value of&nbsp;MAGGAIN\_2GAUSS, MAGGAIN\_4GAUSS, MAGGAIN\_8GAUSS, or MAGGAIN\_12GAUSS from the adafruit\_lsm9ds0 module. &nbsp;The default is 2 gauss.
- **gyro\_scale** - The scale of the gyroscope, should be a value of&nbsp;GYROSCALE\_245DPS, GYROSCALE\_500DPS, or GYROSCALE\_2000DPS from the adafruit\_lsm9ds0 module. &nbsp;The default is 245 DPS.

```auto
sensor.accel_range = adafruit_lsm9ds0.ACCELRANGE_4G
sensor.mag_gain = adafruit_lsm9ds0.MAGGAIN_8GAUSS
sensor.gyro_scale = adafruit_lsm9ds0.GYROSCALE_500DPS
```

![](https://cdn-learn.adafruit.com/assets/assets/000/048/918/medium800/sensors_Screen_Shot_2017-12-05_at_7.40.18_PM.png?1512531640)

See the [simpletest.py example](https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0/blob/master/examples/lsm9ds0_simpletest.py) for a complete demo of printing the accelerometer, magnetometer, gyroscope&nbsp;every second. &nbsp;Save this as **main.py** on the board and examine the REPL output to see the range printed every second.

That's all there is to using the LSM9DS0 with CircuitPython!

# Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0/blob/main/examples/lsm9ds0_simpletest.py

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Python Docs

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## FAQs

### 

While there is a temperature sensor inside the LSM9DSO, unfortunately there isn't enough information provided in the datasheet to properly interpret or convert the values. &nbsp;We've made our best guess at interpreting the data, but you may need to incorporate an external temperature sensor if you require accurate temperature values in your system.

This is a known and long-standing issue with this sensor ([example](https://my.st.com/public/STe2ecommunities/mems_sensors/Lists/iNEMOInertial%20Modules/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmems_sensors%2FLists%2FiNEMOInertial%20Modules%2FLSM9DS0%20Temperature%20Sensor&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800086DD5DC1DB3D22448C420AF2FFF2FD9A&currentviews=472)), and to our knowledge ST has never addressed it or provided the extra information needed to accurately interpret the raw temperature data.

# Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

## Downloads

# Datasheets

- [LSM9DS0 Datasheet](http://www.adafruit.com/datasheets/LSM9DS0.pdf)
- [Breakout EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-LSM9DS0-PCB)
- [Flora EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Flora-LSM9DS0-9DOF-PCB)
- [Fritzing objects available in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)

# Breakout Board Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/018/546/medium800/sensors_breakoutschem.png?1406846156)

# Breakout Board PCB Print
Dimensions in Inches  
![](https://cdn-learn.adafruit.com/assets/assets/000/018/545/medium800/sensors_breakoutprint.png?1406846143)

# Flora Breakout Schematics
![](https://cdn-learn.adafruit.com/assets/assets/000/018/548/medium800/sensors_floraschm.png?1406847145)

# Flora Breakout PCB Print
Dimensions in Inches  
![](https://cdn-learn.adafruit.com/assets/assets/000/018/547/medium800/sensors_flora9dof.png?1406846443)


## Related Guides

- [Magic Wand](https://learn.adafruit.com/magic-wand.md)
- [Bluefruit Playground App](https://learn.adafruit.com/bluefruit-playground-app.md)
- [Cartoon Network MakeCode: Garnet's Gauntlets from Steven Universe](https://learn.adafruit.com/cartoon-network-makecode-garnets-gauntlets-from-steven-universe.md)
- [ST 9-DoF Combo Breakouts and Wings](https://learn.adafruit.com/st-9-dof-combo.md)
- [BlueLive: Livestream Studio switcher controller](https://learn.adafruit.com/bluelive.md)
- [Adafruit FunHouse](https://learn.adafruit.com/adafruit-funhouse.md)
- [Using an IR Remote with a Raspberry Pi Media Center](https://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center.md)
- [Submitting an open-source project to OSHWA](https://learn.adafruit.com/submitting-an-open-source-project-to-oshwa.md)
- [Adafruit I2S MEMS Microphone Breakout](https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout.md)
- [Adafruit HUSB238 USB Type C Power Delivery Breakout](https://learn.adafruit.com/adafruit-husb238-usb-type-c-power-delivery-breakout.md)
- [Adafruit VEML7700 Ambient Light Sensor](https://learn.adafruit.com/adafruit-veml7700.md)
- [Quick-Start the Pico W WiFi with CircuitPython](https://learn.adafruit.com/pico-w-wifi-with-circuitpython.md)
- [Adafruit Simple Soil Moisture Sensor](https://learn.adafruit.com/adafruit-simple-soil-moisture-sensor.md)
- [How we designed an injection-molded case](https://learn.adafruit.com/how-we-designed-an-injection-molded-case-for-raspberry-pi.md)
- [Adafruit PDM Microphone Breakout](https://learn.adafruit.com/adafruit-pdm-microphone-breakout.md)
