Mobile devices come with a wide variety of sensors on board which provide a lot of information about the local environment and the current state of the device itself. The table below provides a brief summary of the typical sensors that you are likely to find. The actual sensors available will vary from one device to another.
The data from the device's on-board components can be used in exactly the same way as data from sensors connected to an Arduino. For example, you could build an app which senses its own movement, and once you had processed the raw data, you could send simple signals over a Bluetooth connection to control the behaviour of an LED strip.
|GPS||Provides the geographic location of the device based on satellite signals|
|Accelerometer||Senses the movement of the device with respect an acceleration. This can be used to detect device orientation, the strength of local gravity and the linear acceleration of the device - ie its movement in a particular direction.|
|Gyroscope||Senses the rate of rotation of the device|
|Light||Senses ambient light levels|
|Pressure||Senses local atmospheric pressure|
|Magnetic field||Senses the strength of the local geomagnetic field in three dimensions|
|Proximity||Senses when the device is close to another object - usually only in one direction and typically switches from false to true at some very short distance|
|Relative humidity||Senses the proportion of water vapour in the air|
|Battery sensor||Senses battery power level|
|NFC||Senses contact with other NFC-enabled devices|
In addition, there are several other components that are not generally described as sensors, but which can be used to extract useful information about the device and its immediate environment.
|Component||Use as a sensor|
|Microphone||Senses ambient sound level|
|WiFi modem||Provides information about signal strength which can be used to estimate distance from and access point. The WiFi modem can also be used to provide location information|
|Bluetooth modem||Provides information about the proximity of other Bluetooth-enabled devices|
|Touchscreen||Senses contact with certain materials|
To see what sensors are available on a device and what data can be extracted from them, you can use an app such as Androsensor.