From: Rob S. <sa...@ph...> - 2008-06-21 03:46:09
|
I have made available a new VPython program ( headtrack-Wiimotelib121-PY24.py ) from http://physics.syr.edu/~salgado/software/vpython/ which receives real-time data from the Nintendo Wii Remote (Wiimote). This [Windows-only] VPython program is an attempt to emulate the Head Tracking efforts of Johnny Chung Lee (http://www.cs.cmu.edu/~johnny/projects/wii/). SOME DETAILS... In order to read in the real-time data from the the Wiimote, we use the procedure presented by Nishio Hirokazu in http://nishiohirokazu.blogspot.com/2008/01/get-values-from-wii-remote-through.html, which uses Brian Peek's (Windows-only) WiimoteLib v1.2.1 [a library for using a Nintendo Wii Remote (Wiimote) from .NET.] (http://www.codeplex.com/WiimoteLib/Release/ProjectReleases.aspx?ReleaseId=10283) described in "Code4Fun - Managed Library for Nintendo's Wiimote (Brian Peek)" (http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx). To use .NET with Python, we used Brian Lloyd's Python for .NET (http://pythonnet.sourceforge.net/). Ideally, we would have liked to use the latest versions of the various software packages [which should be possible]. However, for now, the combination of versions that worked for us [with our program] is: - Python 2.4, VPython 3.2.9 - pythonnet-1.0-rc2-py2.4-clr1.1 - WiimoteLib v1.2.1 I'm sure there is a platform-independent solution in which Python communicates directly with Bluetooth. Of course, one now needs to know details of the protocol for talking with the Wiimote. Note: This was just thrown together as a "proof of concept". The code isn't the prettiest. The tracking and the visualization could certainly be improved. If you get it to work with more recent versions of Python and the various modules or on a different platform, please let us know. rob salgado |