I'm playing with accelerometer now. The main idea is to move cursor using phone. I'm just accumulate values (deltas) that accelerometer gives me every tick to x and y position.
The problem is that accelerometer sends parasite values when I stop moving phone. For example: When i move phone right, i have sequence like:
1, 2, 5, 3, 5,
Then I stop moving. Accelerometer still produces values, but in opposite direction, like:
-3, -2, -2, -1
An than it generates zeroes. How can i avoid values, that moves me to the reverse direction, without any phone motion?