Accelerometer:
Gyroscope:
GPS:
Proximity sensor/Ultrasonic sensor module detect the presence of nearby objects without any physical contact.
Arduino Code
DownloadReal world application
In mobile devices, the proximity sensor is used to detect whether the user's face is close to the phone during a phone call, prompting the screen to turn off to prevent false touches on the touchscreen.
Infer from data sheet
The data sheet for Ultrasonic Ranging Module HC - SR04(Download) speaks about the range of ultrasonic sensor, the basic principle of working, voltage and current required and wire connections. Basically this sensor provides range between 2cm to 400cm. This proximity sensor works on 5v voltage and 15mA current.