I’ve playing with the MMA7260Q accelerometer. Following the indications in
- Measuring Tilt with Low-g accelerometers.
- Implementing Auto-zero calibration technique for accelerometers.
- AN3461 Tilt Sensing Using Linear Accelerometers.
I managed to put together this piece of code that ouputs the tilt angles ρ(rho) , φ(phi); and Θ(theta) in degrees. I does automatic autozero calibration so before getting sensible results you should tilt the sensor around +/-90 degrees in every axis.