O'Reilly logo

Internet of Things with Python by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required