Datasheet
Python &
CircuitPython
It's easy to use the LSM6DSOX or ISM330DHCX sensors with Python and CircuitPython, and the Adafruit CircuitPython
LSM6DS (https://adafru.it/Iec) module. This module allows you to easily write Python code that reads measurements
from the accelerometer and gyro, and will work with either 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 LSM6DSOX or ISM330DHCX to your board for an I2C connection, exactly as shown below. Here's an
example of wiring a Feather M4 to the sensor with I2C:
Board 3V to sensor VIN (red wire)
Board GND to sensor GND (black
wire)
Board SCL to sensor SCL (yellow wire)
Board SDA to sensor SDA (blue wire)
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/lsm6dsox-and-ism330dhc-6-dof-imu Page 16 of 23










