Ruben Laguna's blog

Nov 3, 2008 - 1 minute read - accelerometer arduino electronics mma7260q sensor tilt

Arduino tilt sensor using MMA7260Q accelerometer

I’ve playing with the MMA7260Q accelerometer. Following the indications in

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.