Arduino sketch to calculate the angle of inclination using a 3-axis accelerometer