In my iPhone application i am using Accelerometer to find the movement of the device.
using some formula I am finding a int value (P) with the x,y and z acceleration. this P value is being found in every .5 seconds.
I want to show an alert if the P value is same for continuous 4 times. How to do this.