adafruit_lsm9ds0
¶
CircuitPython module for the LSM9DS0 accelerometer, magnetometer, gyroscope. Based on the driver from: https://github.com/adafruit/Adafruit_LSM9DS0
See examples/simpletest.py for a demo of the usage.
- Author(s): Tony DiCola
Implementation Notes¶
Hardware:
- Adafruit 9-DOF Accel/Mag/Gyro+Temp Breakout Board - LSM9DS0 (Product ID: 2021)
- FLORA 9-DOF Accelerometer/Gyroscope/Magnetometer - LSM9DS0 (Product ID: 2020)
Software and Dependencies:
- Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_lsm9ds0.
LSM9DS0
[source]¶ Driver for the LSM9DS0 accelerometer, magnetometer, gyroscope.
-
accel_range
¶ The accelerometer range. Must be a value of: - ACCELRANGE_2G - ACCELRANGE_4G - ACCELRANGE_6G - ACCELRANGE_8G - ACCELRANGE_16G
-
acceleration
¶ The accelerometer X, Y, Z axis values as a 3-tuple of m/s^2 values.
-
gyro
¶ The gyroscope X, Y, Z axis values as a 3-tuple of degrees/second values.
-
gyro_scale
¶ The gyroscope scale. Must be a value of: - GYROSCALE_245DPS - GYROSCALE_500DPS - GYROSCALE_2000DPS
-
mag_gain
¶ The magnetometer gain. Must be a value of: - MAGGAIN_2GAUSS - MAGGAIN_4GAUSS - MAGGAIN_8GAUSS - MAGGAIN_12GAUSS
-
magnetic
¶ The magnetometer X, Y, Z axis values as a 3-tuple of gauss values.
-
read_accel_raw
()[source]¶ Read the raw accelerometer sensor values and return it as a 3-tuple of X, Y, Z axis values that are 16-bit unsigned values. If you want the acceleration in nice units you probably want to use the accelerometer property!
-
read_gyro_raw
()[source]¶ Read the raw gyroscope sensor values and return it as a 3-tuple of X, Y, Z axis values that are 16-bit unsigned values. If you want the gyroscope in nice units you probably want to use the gyroscope property!
-
read_mag_raw
()[source]¶ Read the raw magnetometer sensor values and return it as a 3-tuple of X, Y, Z axis values that are 16-bit unsigned values. If you want the magnetometer in nice units you probably want to use the magnetometer property!
-
read_temp_raw
()[source]¶ Read the raw temperature sensor value and return it as a 16-bit unsigned value. If you want the temperature in nice units you probably want to use the temperature property!
-
temperature
¶ The temperature of the sensor in degrees Celsius.
-