MX2125 2-Axis Accelermoeter Library  v0.85
Memsic Mx2125 accelerometer library for educational applications
Functions
mx2125_accel.c File Reference
#include "mx2125.h"

Functions

int mx_accel (int axisPin)
 Measure acceleration in terms of g (acceleration due to earth's gravity). A measurement of +/-1250 corresponds to approximately +/- 1 g. More...
 

Function Documentation

int mx_accel ( int  axisPin)

Measure acceleration in terms of g (acceleration due to earth's gravity). A measurement of +/-1250 corresponds to approximately +/- 1 g.

Parameters
axisPinNumber of I/O pin connected to either MX2125's X- or Y- axis pins.
Returns
Value that represents 1250ths of a g acting on the axis. 1250ths is a nominal value, the accelerometer is not that precise.