|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
41 unsigned char mgLSB = range * 8;
43 if (range == 16) { mgLSB += 64; }
45 if (res == 10) { mgLSB = mgLSB >> 2; }
47 else if (res == 12) { mgLSB = mgLSB >> 4; }
int lis3dh_getRange(lis3dh_t *device)
Reads the g measurement range; one of +/- 2, +/-4, +/- 8, +- 16 g.
int lis3dh_getAccel_mg(lis3dh_t *device, int axis)
Gets mg (milli-g's) accelerometer measurements from a single axis (x, y, or z).
int lis3dh_accel_mg(lis3dh_t *device, int *xmg, int *ymg, int *zmg)
Gets mg (milli-g's) accelerometer measurements from all three axis (x, y, z).
int lis3dh_accel(lis3dh_t *device, int *x, int *y, int *z)
Gets raw accelerometer measurements from all three axis (x, y, z).
Simplifies reading Parallax LIS3DH 3-Axis Accelerometer Module with ADC.
int lis3dh_getResolution(lis3dh_t *device)
Reads the bit resolution setting from the sensor. 8-bit, 10-bit or 12-bit.