Measurement of g using a pendulum and a smartphone proximity sensor

Abstract
The use of sensors in smartphones to do physical experiments is a boom in the past decade, such as acceleration sensor,1,2 light sensor,3,4 magnetometer,5,6 camera,7,8 and gyroscope. However, few people study the application of proximity sensors in physical experiments, although, in our view, the employment of the proximity sensor is more accurate than other sensors (see Table I). For further research, this paper proposes a method to measure the oscillation period of a simple pendulum based on the proximity sensor integrated in the smartphone and determines the experimental value of the gravitational acceleration. Theoretical background