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

Functions

int mx_tilt (int axisPin)
 Measure the level of tilt in terms of +/- 90 degrees. 0 degrees is when the top surface of the accelerometer chip is parallel to the ground. More...
 

Function Documentation

int mx_tilt ( int  axisPin)

Measure the level of tilt in terms of +/- 90 degrees. 0 degrees is when the top surface of the accelerometer chip is parallel to the ground.

Parameters
axisPinNumber of I/O pin connected to either of MX2125's X- or Y- axis pins.
Returns
Value from 0 to 90 that represents the tilt of that axis.