I am wanting to have my device sense small vibrations, such as a small shake, or someone breathing. I am assuming that this is possible because the app store has a number of "Sleep Pattern Monitor" apps, and they have good reviews.
Does anyone know a way, using the accelerometer or gyroscope (or something else?) to sense these small movements or vibrations? If so, is there sample code?