Tilt angle using accelerometer