Intro: Android Edition for JustAPendulum
As for his big brother JustAPendulum, this app uses an Infrared sensor, the same you use while you call to turn off the screen. This time the sensor is only one but the main concept is the same: measure the oscillation period to find the gravitational acceleration of the earth (~9,8 m/s²).
No other Hardware is needed, if you're really tired...
Step 1: Prepare Your Phone and Start
Make a simple paper ring on the sensor, release the ball and then press start!
With less than three seconds, the app finished all the calculations and you're ready to see them.
What do you think about this app? :-)
Step 2: Technology Explained
Like an Arduino, App Inventor 2 has got a function called millis: it returns the time in milliseconds, so the app waits the ball, starts the counter and when the ball arrives another time near the proximity sensor, JustAPendulum substracts the current time in milliseconds with the last value.
With the oscillation period and the lenght of the wire we can find the gravitational acceleration with a simple calulation.