O'Reilly logo

Wearable-Tech Projects with the Raspberry Pi Zero by Jon Witts

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

How a pedometer works

Before we begin looking at our hardware or Python program for this project, it is worth spending a little bit of time understanding how a pedometer uses the data from an accelerometer to calculate steps taken. If you already use a pedometer and have compared the results from one application or device to that of another, you are probably aware that they will nearly always differ in their readings. This is because each pedometer will be using a slightly different algorithm to calculate steps taken from the data it is receiving from the accelerometer.

Our accelerometer measures acceleration through three different axis, x, y, and z, and it returns these as a measurement relative to the gravitational pull upon the device. ...

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