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

Functions

int mx_rotate (int xPin, int yPin)
 Measure clockwise rotation assuming accelerometer is held vertical. Zero degree rotation is when the triangle on the MX2125 chip is pointing up. More...
 

Function Documentation

int mx_rotate ( int  xPin,
int  yPin 
)

Measure clockwise rotation assuming accelerometer is held vertical. Zero degree rotation is when the triangle on the MX2125 chip is pointing up.

Parameters
xPinNumber of I/O pin connected to MX2125's x-axis pin.
yPinNumber of I/O pin connected to MX2125's y-axis pin.
Returns
Integer degree value (0 to 359) that represents the clockwise angle of rotation.