Hi guys,
Just working on a project using the iPhone accelerometer, i seem to be struggling with a simple prob..
I am basically storing the accelerometer values into an array using a button. I am doing this several times (but all stored in SAME array).
I then have a method that checks every value with its proceeding value
e.g
if the first reading was 10 4 6 9
this method would check 10 with 4, 4 with 6 and 6 with 9.
So far this is fine, but if the accelerometer data is saved several times..
e.g. first reading = 10, 4, 6, 9
second reading = 7, 5, 2, 8
What i wanted the method to do is compare the values in the first reading then compare the values in the second reading. but the method is comparing every value with its proceeding one since all the values are in the same array.
How would i overcome this pro.
cheers in advance::
Just working on a project using the iPhone accelerometer, i seem to be struggling with a simple prob..
I am basically storing the accelerometer values into an array using a button. I am doing this several times (but all stored in SAME array).
I then have a method that checks every value with its proceeding value
e.g
if the first reading was 10 4 6 9
this method would check 10 with 4, 4 with 6 and 6 with 9.
So far this is fine, but if the accelerometer data is saved several times..
e.g. first reading = 10, 4, 6, 9
second reading = 7, 5, 2, 8
What i wanted the method to do is compare the values in the first reading then compare the values in the second reading. but the method is comparing every value with its proceeding one since all the values are in the same array.
How would i overcome this pro.
cheers in advance::