| 
    upm
    0.3.2
    
   Sensor/Actuator repository for libmraa (v0.7.2) 
   | 
 
API for the LSM303 Accelerometer & Compass. More...
This file defines the LSM303DLH 3-axis magnetometer/3-axis accelerometer. This module was tested with the Seeed Studio* Grove 6-Axis Accelerometer & Compass module used over I2C. The magnometer and acceleromter are accessed at two seperate I2C addresses.
Public Member Functions | |
| LSM303 (int bus, int addrMag=LSM303_MAG, int addrAcc=LSM303_ACC, int accScale=8) | |
| ~LSM303 () | |
| float | getHeading () | 
| mraa_result_t | getCoordinates () | 
| mraa_result_t | getAcceleration () | 
| int16_t * | getRawCoorData () | 
| int16_t | getCoorX () | 
| int16_t | getCoorY () | 
| int16_t | getCoorZ () | 
| int16_t * | getRawAccelData () | 
| int16_t | getAccelX () | 
| int16_t | getAccelY () | 
| int16_t | getAccelZ () | 
| LSM303 | ( | int | bus, | 
| int | addrMag = LSM303_MAG,  | 
        ||
| int | addrAcc = LSM303_ACC,  | 
        ||
| int | accScale = 8  | 
        ||
| ) | 
Instantiates an LSM303 object
| i2c | bus | 
| addr | Magnetometer | 
| addr | Accelerometer | 
| float getHeading | ( | ) | 
Gets the current heading; headings <0 indicate an error has occurred

| mraa_result_t getCoordinates | ( | ) | 
Gets the coordinates in the XYZ order

| mraa_result_t getAcceleration | ( | ) | 
Gets accelerometer values Should be called before other "get" functions for acceleration
| int16_t * getRawCoorData | ( | ) | 
Gets raw coordinate data; it is updated when getCoordinates() is called
| int16_t getCoorX | ( | ) | 
Gets the X component of the coordinates data
| int16_t getCoorY | ( | ) | 
Gets the Y component of the coordinates data
| int16_t getCoorZ | ( | ) | 
Gets the Z component of the coordinates data
| int16_t * getRawAccelData | ( | ) | 
Gets raw accelerometer data; it is updated when getAcceleration() is called
| int16_t getAccelX | ( | ) | 
Gets the X component of the acceleration data
| int16_t getAccelY | ( | ) | 
Gets the Y component of the acceleration data
| int16_t getAccelZ | ( | ) | 
Gets the Z component of the acceleration data
 1.8.9.1