First Try

Nick helped me connect a Wiimote to my Toshiba Satellite A205-S4629 by using an Azio bluetooth dongle and the Director Xtra by Glisferox.  The test program included with the Xtra responded to all the Wiimote buttons, and changed color based on the position of the Wiimote.  We weren’t unable to move the sprite based on the location of the Wiimote, because its x, y, and z coordinates referred to its acceleration.  We also tried to add in a second controller by initializing another instance, or Wiimote variable, which was not successful. 

We researched a bit more regarding the physics of the Wiimote, and found a Motion Analysis page on WiiLi.org, which included a formula to figure out the tilt position based on all 3 accelerometers.  Since Director has no known arctan2 function, we needed to convert it to arctan.  In short, here are the formulas:
roll = arctan2(ax,sqrt(ay^2+az^2))
pitch = arctan2(ay,sqrt(ax^2+az^2))
Arctan2 = (Arctan(Abs(X) / Abs(Y)) * sgn(X) – pi / 2) * sgn(Y)
where sgn = -1 if x < 0, sgn = 0 if x = 0, and sgn = 1 if x > 1.

Next Steps: Read up more on Accelerometers, Libraries, APIs, Bluetooth stacks, peruse WiiLi.org, figure out motion detection and tilt sensing.

This entry was posted in Undergrad thesis and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.