An accelerometer measures the acceleration of your phone. It does that on three axes: horizontal, vertical, and forward/backward. It also senses vibration, tilt, and free fall. Being able to calculate ...
[mircemk] shows how to create a simple non-contact proximity sensor using little more than an Arduino Nano board, and a convenient software library intended to measure the value of capacitors.