adafruit_lsm9ds1
¶
CircuitPython module for the LSM9DS1 accelerometer, magnetometer, gyroscope. Based on the driver from:
See examples/simpletest.py for a demo of the usage.
- Author(s): Tony DiCola
-
class
adafruit_lsm9ds1.
LSM9DS1
[source]¶ Driver for the LSM9DS1 accelerometer, magnetometer, gyroscope.
-
accel_range
¶ Get and set the accelerometer range. Must be a value of: - ACCELRANGE_2G - ACCELRANGE_4G - ACCELRANGE_8G - ACCELRANGE_16G
-
accelerometer
¶ Get the accelerometer X, Y, Z axis values as a 3-tuple of m/s^2 values.
-
gyro_scale
¶ Get and set the gyroscope scale. Must be a value of: - GYROSCALE_245DPS - GYROSCALE_500DPS - GYROSCALE_2000DPS
-
gyroscope
¶ Get the gyroscope X, Y, Z axis values as a 3-tuple of degrees/second values.
-
mag_gain
¶ Get and set the magnetometer gain. Must be a value of: - MAGGAIN_4GAUSS - MAGGAIN_8GAUSS - MAGGAIN_12GAUSS - MAGGAIN_16GAUSS
-
magnetometer
¶ Get 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 12-bit signed value. If you want the temperature in nice units you probably want to use the temperature property!
-
temperature
¶ Get the temperature of the sensor in degrees Celsius.
-