Author Topic: wiimote with matlab  (Read 15877 times)

Offline baguear

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
on: July 24, 2008, 12:39:31 PM

Does anyone tested the wiimote with matlab? I^ve been trying to used the WIILAB and the fWIIne without success.
Maybe its because im using Windows Vista.
If anybody can help me I would really appreciate!!


Offline williiam

  • *
  • Posts: 21
  • Karma: +1/-0
    • View Profile
    • fWiineur ; web-site for fWIIne
Reply #1 on: July 28, 2008, 12:51:37 PM
As far I know, 3 applications are, freely, available around the web :

- the WiiLAB project
- a DLL "main" C-MEX function
- fWIIne

The 3 applications are functioning under WinXP.

I can only deliver you some informations about fWIIne but I cannot ensure
it works with Vista because I never tested with. (Of course I'd like to know, too.)
The main limitation to use fWIIne with Vista should be the compatibility between
builded libraries with WinXP and Vista.
[Does anybody know it ? About bluetooth libs or wiimote libs (wiiuse,cwiimote,etc...) ? ]

- Without any compatibility, you will have to compile again the libs with Visual Studio and Vista.

- With compatibility, you may have some "usual" starting issue as

I hope this suggestion is going to work for you. I know some users are also interested in versions
for Linux and OS X. Unfortunately, the versions for Matlab are not available, yet. I hope some developers will be
interested in bringing this kind of connectivity with Linux, OS X and Vista.

- Wiilliam

Offline baguear

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reply #2 on: November 05, 2008, 06:38:58 AM

thanks for the information.
I have been working in other project so I didn´t try to use the wiimote again.
Know Im again working with it, I try the Wiilab (with Matlab 2008 running under Vista). I have problems with the IR tracking but the other functions are working great (rumble, accel, nunchuk). Just like you said maybe its a problem with compatibility between the builded libraries. I will try it under XP.

Another idea would be using the wiiuse lib, and one of the different tools that matlab provide (engine.h, mex or maybe a dll).
I wonder witch option has the most accurate IR tracking in terms of time response (just to keep a constant sampling rate). Does anybody knows something about that issue?

Many thanks in advance!


Offline williiam

  • *
  • Posts: 21
  • Karma: +1/-0
    • View Profile
    • fWiineur ; web-site for fWIIne
Reply #3 on: February 09, 2009, 04:31:46 PM

Thanks for your advice,
Ok i used the library wiiuse for the latest release of  mex library fwiine v0.3.

Hope it will be more compatible,

Offline icinnamon

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reply #4 on: June 26, 2009, 11:36:53 AM
I'm trying to use fWiine but I keep getting this error:
Code: [Select]
??? Invalid MEX-file 'C:\Documents and
Documents\MATLAB\fWIIne\fWIIne.mexw32': This application
has failed to start because the application configuration
is incorrect. Reinstalling the application may fix this
I've installed Visual Studio 2008 Express and vcredist_x86.exe.  It still has the same error.  Any advice?


I also tried WiiLAB but apparently SetAccess = Private fails.  I tried SetAccess = 'Private' but it still fails...

Offline pamejudd

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Reply #5 on: June 29, 2009, 05:04:17 AM
HI guys,

Does anyone have an idea whether any of the above software allows for reading Wiimote camera data directly in Matlab?


Offline williiam

  • *
  • Posts: 21
  • Karma: +1/-0
    • View Profile
    • fWiineur ; web-site for fWIIne
Reply #6 on: June 30, 2009, 11:38:37 AM

Ok you will find a compilation of several mails I already sent to developers.
The library is too much dependent on other libs so you will have to compile fWIIne, I’m afraid. (to skip item nr 2)
Hope it will work for you, too !

(special thanks to Kevin !)

1. First, a little check-list before configuration :

WindowsXP.............……………. []
Matlab r2007a.........…………….  [] (r2007b and latest versions work properly, too)
Microsoft Visual Studio 2005....…[] (Visual Studio 8 or latest versions, too)
Bluetooth communication....……. [] (can be easily tested with GlovePie scripts)

2. Then, you will find a list of some “usual” issues :

a. First, have the look at the section "3. Troubleshooting with fWIIne.mexw32 and Matlab for WinXP" of the following post :

b. You’ve got the following error message "This application has failed to start because the application configuration is incorrect."
In my opinion, the problem comes from Microsoft VS runtime libraries :

- This error has already been detected by other users. See :

- But you said me that MS visual studio 8 (2005) was already installed. So my suggestion is to check, before, the folder "C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT" as the same as :

c. Unfortunately, some failures can occur at this step (as for example, The folder "C:\Program Files\Microsoft Visual Studio 8\VC" may be necessary)

That’s why, a C++ compilation is suggested to solve the problem, definitely.

3. Building library fWIIne.mexw32

Usually, some additionnal libraries would be necessary. The release note may help you : manual-for-fwiine-v02.html
(the release note for V0.3 is not currently available. Anyway, the link above will give you the needed libraries)

(folder structure and .sln solution file for visual studio)

To summarize the build process : You will have to build the library wiiuse.lib before building fWIIne.mexw32.  Several files (hidsdi.h…) from the Microsoft toolkit are needed so you will have to make some modifications.

You need some libraries from the Windows Driver Development Kit ( to compile wiiuse.lib.
Either you download the development kit  or you configure the following folders with the files from the directory "dependencies" (try quickly the second solution but in my opinion you will have to chose the first one) :
a. wiiuse sub-project : Additionnal include directories -> see  "1.include_library_update.JPG"

(wiiuse sub-project - Properties prt 1)

b. wiiuse sub- project : Additionnal library directories -> see "2.library_directory_update.JPG"

(wiiuse sub-project - Properties prt 2)

At this step, you can try to clean and re-build the sub-project wiiuse in order to check the compilation worked properly :

(clean and build the sub-project)

You may encounter some warnings but no failure to go to next step

c. fWIIne sub-project : try to clean and rebuild, first. (here we have local folders)
If you encounter some failures then you will have to change additionnal include/library directories as the same as previously -> see "3.library&include_directories_mexw32_update.JPG"

(fWIIne sub-project - Properties /  Then clean and build the sub-project)

At this step; the build process should provide you the file fWIIne.mexw32.