pyupm_lsm303dlh module¶
-
class
pyupm_lsm303dlh.
LSM303DLH
(bus, addrMag=30, addrAcc=25, accScale=8)[source]¶ Bases:
object
API for the LSM303DLH Accelerometer & Compass.
ID: lsm303dlh
Name: Triaxial Accelerometer/magnetometer
Other Names: Grove 6-Axis Accelerometer & Compass
Category: accelerometer compass
Manufacturer: seeed adafruit stmicro
Link:http://www.seeedstudio.com/wiki/Grove_-_6-Axis_Accelerometer%26Compass
Connection: i2c This module defines the LSM303DLHDLH 3-axis magnetometer/3-axis accelerometer. This module was tested with the Seeed Studio* Grove 6-Axis Accelerometer & Compass module used over I2C. The magnetometer and acceleromter are accessed at two seperate I2C addresses.
C++ includes: lsm303dlh.hpp
-
LSM303DLH_ACC_T
= 1¶
-
LSM303DLH_MAG_T
= 0¶
-
getAcceleration
()[source]¶ mraa::Result getAcceleration()
Gets accelerometer values Should be called before other “get” functions for acceleration
-
getHeading
()[source]¶ float getHeading()
LSM303DLH object destructor where is no more need for this here - I2c connection will be stopped automatically when m_i2c variable will go out of scope ~LSM303DLH (); Gets the current heading; headings <0 indicate an error has occurred
float
-