WiiLAB Example Code - WiiLABTest
Annotations
This is a C# executable program that can be used to easily and quickly test the Wiimote's connection to the computer and MATLAB's ability to communicate with the WiimoteLib through WiiLAB.
WiiLABTest allows up to four Wiimotes to connect simultaneously. The application will create a new tab that contains the Wiimote's information (Buttons, Acceleration, IR detection, etc.), along with the feedback controls available for that Wiimote (LEDs and Rumble).
The application also includes a button in the bottom left-hand corner that will test MATLAB's ability to access the WiimoteLib. This is used to test if the installation of WiiLAB was successful without having to open MATLAB. Below is the "Success" message after the test.
Raw Source Code
The source code is also available as a .cs file download at the bottom of the page. A zip file of the project solution is also attached.
I am not posting the actual source code on this page (just the files) because the program spans over multiple files and copy and pasting the code here would only make it more difficult to understand.
You can also access the most recent version of WiiLABTest from our SVN repository
here.
References and Acknowledgments
This program is a modified version of Brian Peek's WiimoteTest application that can be found
here.
We have altered the interface to suit our project's needs. Along with adding the ability to choose which Wiimotes to connect to, we added a button that will retry discovering the paired Wiimotes without having to restart the application.
--
JordanBrindza - 09 Jul 2008