GlovePIE:Read motions with Excel
From WiiLi
Contents |
[edit] A cheap and easy way to analyze motions
By Marc-Andre Larouche
[edit] Download the Package
Download Package here (fixed March 11, 2008)
[edit] Requirement
1 Windows PC (Sorry mac user, I'm sad too)
1 nintendo Wiimote
1 Bluetooth adapter
microsoft excel
glovePIE v0.21+
[edit] Part 1
[edit] GlovePIE section
1) Unzip our motion recognition package with your favorite archive application (winzip...)
2) Open the GlovePIE script called "motionTest(glovePIE).PIE".
[edit] GlovePIE script
/********************************************* * This code must be use with motionTest(excel).xls * GPL License * Writen by Marc-Andre Larouche * marclar83@gmail.com * Version 0.21 * tested on GlovePIE 0.29 * September 2007 ***********************************************/ // Hold "b" during the motion recording if wiimote.b == true and var.start != true then var.start = true; end if // Release "b" to stop recording and add a space between data if wiimote.b != true and var.start == true then var.start = false; key.Right = true; key.Right = false; end if if wiimote.b == true and var.start == true then typeUnicode(wiimote.gx); key.Down = true; key.Down = false; typeUnicode(wiimote.gy); key.Down = true; key.Down = false; typeUnicode(wiimote.gz); key.Up = true; key.Up = false; key.Up = true; key.Up = false; key.Right = true; key.Right = false; end if
This pretty simple script use a keyboard emulation to input data in a specific order. Only the three G-forces are compiled.
3) Run the script.
[edit] Part 2
[edit] excel section
1) Open the excel document "motionTest(excel).xls".
This document is separated in two parts (The raw data (1) and the visual chart (2))
In the top-left corner you see a lighter blue space under the label "Start here", I think its self-explanatory.
2) Set the focus on that area by clicking on it.
With your wiimote you can now record motion by holding the "b" button.
Each time you release the "b" button the script skip one column, making it easier to read.
As you can see, the chart's drawing simultaneously with the data.
You can record up to 255 coordinates per sheet. By default, the file contains 26 sheets with this template. You can add more sheets if you need it. Be aware, that analysing the motion won't give you any "magic" formula to write your glovePIE scripts, but its a good way to see what is the behaviors of a motions and then code it into formula.
Good luck!






