What is an accelerometer?
The accelerometer in your mobile phone is a sensor used to detect the orientation of the phone - it works in a similar way to a traditional compass, and gives your phone a sense of direction and position. Accelerometers are often used in running and walking apps to show how far you’ve walked or run, and to track your steps.
Accelerometers in smartphones are also used to ‘tell’ your phone which direction it’s facing, and up from down - when your phone tilts as you turn it sideways, that’s the accelerometer telling it to.
Accelerometers are also used to help your phone format relevant content, depending on whether it’s in portrait or landscape mode. For example, if you're watching a YouTube video and switch from landscape to portrait mode or vice versa, the accelerometer will advise your phone which way to render the video.