Working with accelerometers

An accelerometer allows us to measure the magnitude and direction of proper acceleration or g-force. Tablets and smartphones use accelerometers to automatically switch between portrait and landscape modes depending on the direction in which we hold the device. In addition, the built-in accelerometer allows us to control apps by making small movements of different intensity with the device in the different directions.

An accelerometer allows us to detect how an object is oriented with respect to the Earth's surface by measuring acceleration due to gravity. In addition, an accelerometer is extremely useful when we want to detect when an object starts or stops moving. Accelerometers are also capable of detecting vibration ...

Get Internet of Things with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.