# The Accelerometer: Theory

The Theory
First let's take a look at how we view the world with the picture below. Our world is 3-dimensional. This means that when we want to measure distance, velocity or acceleration there is a maximum of 3 values (axis) for each. For the accelerometer we are interested in measuring acceleration and though it can exist in any direction X, Y or Z we will only measure it in 1.

Motion On 3-Axis

There are two ways to use the Accelerometer. The first way is to measure the acceleration of whatever obeject the sensor is attached to, or it can measure the tilt of the object it is attached to. Below is a picture that illustrates the measuring of tilt.

A Tilt Sensor

When the sensor is tilted the effect of the earth's gravity upon it changes and so does the sensor's output. This feature is what we'll demonstrate in both the following code and video. The acceleration aspect of what we'll build can also be seen if you put it in a car and slow very quickly or speed up very quickly. (Drive safely on the roads!)

;