How to detect iPhone movement in space using accelerometer ?
Posted
by super_tomtom
on Stack Overflow
See other posts from Stack Overflow
or by super_tomtom
Published on 2010-04-20T11:43:12Z
Indexed on
2010/04/20
11:53 UTC
Read the original article
Hit count: 174
Hi !
I am trying to make an application that would detect what kind of shape you made with your iPhone using accelerometer. As an example, if you draw a circle with your hand holding the iPhone, the app would be able to redraw it on the screen. This could also work with squares, or even more complicated shapes. The only example of application I've seen doing such a thing is AirPaint (http://vimeo.com/2276713), but it doesn't seems to be able to do it in real time.
My first try is to apply a low-pass filter on the X and Y parameters from the accelerometer, and to make a pointer move toward these values, proportionally to the size of the screen. But this is clearly not enought, I have a very low accuracy, and if I shake the device it also makes the pointer move...
Any ideas about that ? Do you think accelerometer data is enought to do it ? Or should I consider using other data, such as the compass ?
Thanks in advance !
© Stack Overflow or respective owner