So after all today’s hard work, still some time for a bit wiimote fiddling 😉
I extended my test app to show the raw accelerometer data.
A few words about what is which graph and the color coding:
The left graph shows the same as 2 days ago, except, I switched the colors to remember the meaning more easily. 😉 R
ed is for R
oll =) and blue is the pitch. These data are calculated by the wiiuse library
The right graph shows the raw accelerometer data. It is simply showing the x (red), y (green) and z (blue) component of the acceleration vector.
The experiment here shows 2 rolls to the left (and return), followed by 2 translations to the left. One could argue that a translation to the left, from the accelerometer’s viewpoint, is just the same as a roll, since both are changing the gravitation vector temporarily in a similar way. I’d say there still seems to be a difference.. 🙂
Paul, I’m open for discussion 😉
Okay, so I finally got to it. A few months ago I bought a wiimote to play a bit with the api’s floating on the net. It was until yesterday that I actually tried a driver, and since that seemed to work okay, I decided to give it a try myself. My simple goal, being an app plotting the raw inputs. However, it took me a 2 hours more than expected (1 =)) and also a lot more blood, sweat and tears. 😉 particularly because I made a lot of mistakes due to me being too tired 😉 So I will keep it short for now as I want to go to sleep.
I choose the wiiuse library as it seemed adequate for the job and still active (and even cross platform!). I started from the included example and tried to wrap it into a Qt app (hence I named it example-qt ;)). The obvious choice for drawing is using QGraphicsView. However, for once ;), I took the effort to see if there are no existing Qt graph plotting libraries. And this just happens to be the case. 🙂 Meet the excellent QWT lib. It couldn’t be more fit for the job. The site is (almost) nothing but the api docs, but that seemed sufficient. One second I thought this lib would not be qt4 ready, but it has been ported!
Quite a few seconds and segfaults later 😉 I got this:
Nothing fancy, but it does show the roll and pitch!! =)
Note: the wiimote survived the experiment 😉