adafruit_lsm303
¶
CircuitPython driver for the LSM303 accelerometer + magnetometer.
Author(s): Dave Astels
Implementation Notes¶
Hardware:
Adafruit Triple-axis Accelerometer+Magnetometer (Compass) Board - LSM303 (Product ID: 1120)
Adafruit FLORA Accelerometer/Compass Sensor - LSM303 - v1.0 (Product ID: 1247)
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_lsm303.LSM303(i2c)[source]¶
Driver for the LSM303 accelerometer/magnetometer.
- property acceleration¶
The processed accelerometer sensor values. A 3-tuple of X, Y, Z axis values in meters per second squared that are signed floats.
- property mag_gain¶
The magnetometer’s gain.
- property mag_rate¶
The magnetometer update rate.
- property magnetic¶
The processed magnetometer sensor values. A 3-tuple of X, Y, Z axis values in microteslas that are signed floats.
- property raw_acceleration¶
The raw accelerometer sensor values. A 3-tuple of X, Y, Z axis values that are 16-bit signed integers.
- property raw_magnetic¶
The raw magnetometer sensor values. A 3-tuple of X, Y, Z axis values that are 16-bit signed integers.