accelerometers vs gyroscopes
They're not the same part.

Accelerometers measures linear forces. That is, forces acting in a straight line: 

                ^
                |
        &lt;---------------&gt;
                |
                v


Gyroscopes measures rotational forces. That is, forces acting spinward:

                 -----.
                        \
            ^            |
            |            v
             \
               '-----


Both are available as 3-axis devices.



Additional Answer:

Both sensors can be used to detect tilt but they do so via different mechanisms. So you need different algorithms.

Accelerometers, as mentioned, detect linear forces. There is one force that always affect us on Earth. And it points straight down. At a rate of roughly 9.8m/s^2

Since the laws of physics (and by extension the sensor) can't tell the difference between gravity and acceleration, accelerometers can be used to detect the vector of gravity and thus detect tilt. The caveat is that the accelerometer has no way to really know if what it's measuring is gravity or you moving it around. So it can only detect tilt when the sensor is relatively stationary.

Gyroscopes on the other hand detect rotational forces. Therefore it can be used to measure how much you've rotated/tilted the sensor. However, gyroscopes have no way to know which way is down. So when stationary, a gyroscope can only tell you that the sensor is not moving. It can't tell you the tilt angle.

So, in general you can use an accelerometer alone to measure tilt. You just need to stop moving to do so. The best way to measure tilt is to use both accelerometers and gyros. So that your algorithm can differentiate tilting with moving side-to-side yet can also tell which direction is down.