A good starting point for recognizing accelerometer gestures is this Kevin Bomberry tutorial at AblePear: http://blog.ablepear.com/2010/02/iphone-sdk-shake-rattle-roll.html
It sets the threshold threshold value for the absolute acceleration value on any axis. I would generate an “event” for the axis that had the highest acceleration during the threshold break (Z POSITIVE, X NEGATIVE, etc.) and click them on the “event history” queue. At the end of each doneAccelerate call, evaluate the queue for patterns that correspond to the gesture, for example: X POSITIVE, X NEGATIVE, X POSITIVE, X NEGATIVE can be considered a “shake” along this axis. This should provide a couple of different gesture commands.
For a simple queue category that complements NSMutableArray, see the following: How do I create and use a queue in Objective-C?
source share