Sunday, November 29, 2009

Entry #12: Spin detection with Wiimote, almost ...

This time I wanted to track the movement of my clubs as I juggled them using the Wii Remote. I thought I could use the data provided by its 3-axis accelerometer to plot the course of the club in space (by integrating velocity from acceleration, and position from velocity).
However the data is not precise enough and after several attempts and hours of tweaking my code I came to the conclusion that using the Wii Remote for this task is just not working.

I thought I would try to detect a full spin of the club instead, as I noticed that I could visually detect a pattern in the graph of DarwiinRemoteOSC when spinning the club (acceleration on the Y axis inversely proportional to the acceleration on Z axis and then free fall).

My gesture recognition algorithm is bad, it doesn't make the difference between a spin and a fast shake and sometimes doesn't recognize a spin at all... But it is only a start !

In the following demo a sound sample is triggered when a spin is detected.




No comments:

Post a Comment