Smart Pendulum
The goal is to measure acceleration due to gravity using a pendulum. The variations in the accelerometer reading are used to automatically count the oscillations. After counting the total time for a preset number of oscillations, the time period is calculated. The acceleration due to gravity g is extracted from this.
Physical Setup
Get a 30 cm or 1 foot plastic scale. Make a hole in it (with heat or by drilling) on one end such that it fits a nail or a hook in the wall.
Download the app called AccelerationG from the play store.
https://play.google.com/store/apps/details?id=appinventor.ai_harish_ravishankar.AccelerationG
Stick the phone to the other end using a double sided tape.
Experiment
Enter the number of oscillations you would like to count and the distance from the point of suspension to center of mass. Displace the system reasonably (30 deg) from equilibrium, press start and release. After the preset counts, the app calculates total time from which the time period and hence the acceleration due to gravity are calculated.
There is also an option to press measure to calculate the y acceleration from the accelerometer when stationary and vertical for comparison.