| View previous topic :: View next topic |
| Author |
Message |
ferno
Joined: 15 Dec 2006 Posts: 10 Location: Columbus, OH
Digg It |
Posted: Sat Dec 16, 2006 12:09 am Post subject: Plotting Info from the Wiimote |
|
|
what would be the best way to plot information from the wiimote (variables like rawforce, relacc, etc.) into a graph that can be updated in realtime, and saved to view later?
i saw something like this in a video with the mac version of the wiimote drivers (darwin i believe)
thanks. |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Sat Dec 16, 2006 12:37 am Post subject: |
|
|
You can't really do it in GlovePIE.
You can try WiinRemote.
In GlovePIE you could use
DebugPrint(Wiimote.RawForceX + ', ' + Wiimote.RawForceY + ', ' + Wiimote.RawForceZ)
And then after stopping your script you could cut and paste into a file and open it in Excel. |
|
| Back to top |
|
 |
ferno
Joined: 15 Dec 2006 Posts: 10 Location: Columbus, OH
Digg It |
Posted: Sat Dec 16, 2006 1:55 am Post subject: |
|
|
awsome, the excel tip works great, thanks
EDIT: is there anyway you can find the change in position of the wiimote? maybe by figuring out how much time has passed between the times of acceleration going from 0 to some number back to 0 and then using an equation (involving the total time and average acceleration???) to solve for x (distance traveled) ?
also, is there anyway I can plot more information in a given period of time? for example I would like to record RawAccX every 0.01 seconds instead of 0.1 seconds |
|
| Back to top |
|
 |
CarlKenner Site Admin
Joined: 29 Nov 2006 Posts: 614
Digg It |
Posted: Sat Dec 16, 2006 7:13 am Post subject: |
|
|
No. I couldn't even calculate velocity successfully, let alone position. But I sure did try. The velocity values were so bad I removed velocity from the list of properties. But the code for it is still in there, you just can't access it.
I'll have another go later.
Part of the problem is seperating real accelerations from gravity. Part of the problem is that accelerations are measured in the Wiimotes axes, so you need to undo the rotation to get velocity in world axes, and seperating the rotation from the real accelerations is hard too (and the "yaw" part of rotation is totally unmeasurable). Part of the problem is that there is noise in the sensors. And part of the problem is that the calibration isn't perfect.
If it currently is running at 10 Hz then no it can't go any faster. If it is currently running at 40 Hz like it is supposed to, then yes, it can go faster.
Add this line to your script:
Pie.FrameRate = 100 Hz |
|
| Back to top |
|
 |
|