Managed Library for Nintendo's Wiimote

Sign in to queue

The Discussion

  • User profile image
    Richard Lalancette

    Looks like the DELL M6400 won't let me skip the code part. So I cannot pair with the wii remote with the current software.

    I wonder if there would be another software I could use to setup bluetooth pairing on my precision M6400.

    I managed to pair with my mac mini, but the mini allowed me to not use a passcode in one of the options... what  a bummer.

  • User profile image
    Josh

    Great article, I'm fooling around with my own code now.

    You could simplify the math a bit by using x^3. That takes care of the sign problem. How do you know the period should be 0.1? I assume this is seconds? Would it be better to capture the actual time?

  • User profile image
    Clint

    @Richard Lalancette, could always try another bluetooth dongle.

  • User profile image
    Sarfraz​Sheikh

    Excellent Library.

    The only problem I faced  is re-pairing the wii remote every time once wii remote is disconnect.

    I could also see issue reported by couple of other users DarinHIggins and BermudaLamb about the same issue. I wonder if this is fixable or a issue in bluetooth stack.

    Thanks,

    Sarfraz

  • User profile image
    Clint

    @SarfrazSheikh, the Wiimote doesn't properly support auto-pairing, so you must manually re-connect each time.  Yes, it's a pain...

  • User profile image
    Clint

    @Ikneedaname re: ipod, no

  • User profile image
    Clint

    @Ikneedaname we don't control that, the Wiimote to work on a PC is a hack and not all bluetooth adapters work on it.  You may want to try http://www.bluesoleil.com/ to get it working but no promises there.

    http://wiibrew.org/wiki/List_of_Working_Bluetooth_Devices are known working adapters

  • User profile image
    Ikneedaname

    also, do you have anything for the ipod touch/ iphone?

  • User profile image
    Ikneedaname

    I am using a Bluetooth device bought @ wall mart. (bad idea.) the wizard doesn't allow skip. is there a code that will allow me to connect to the wiimote with a passcode that my bt dongle would like. heres the url:

    http://www.iogear.com/support/dm/driver/GBU421#display

    i dont have enough money for another dongle. any ideas?

  • User profile image
    Clint

    @hackhack, check out the code in the example!  Brian shows off what the Wiimote sees in a picture box, you should be able to tweak that code into a text file.

  • User profile image
    hackhack

    Does anyone know how to extract the LED position values as they are updated into something like a text file? what code do you use and where do you add it?????? please help me out, ive been stuck on this forever!!!!

  • User profile image
    Shane Selling

    Okay i have been using the Wii library very successfully in many of my programs as a mouse and/or controller. using the library is not my problem its just annoying me that i have to keep the wiimote flat in order to have the mouse move correctly.  i would like some help with trying to make the curser point straight in front of the remote as it does on the wii no matter the rotation of the remote. any help would greatly appreciated.  Its not a big deal but it would be cool if it worked.  

    Thanks to whoever helps me.

  • User profile image
    BauerMECH

    Ikneedaname - If you're running Windows 7 you can simply use the generic win driver for Bluetooth... you'll be given the option to pair w/o passkey.  Do not install the manufacturer's drivers for your dongle. Hope that helps.

  • User profile image
    Clint

    @Shane, one of the easiest ways to do this is to simply use a single IR point. You only need 2 or the midpoint if you want rotation.  In your case you just want the x/y position, so just use a single IR source as your pointer position.

  • User profile image
    Alphasuede

    @CODING4FUN  Are you sure that using a single IR source is a good idea?

    The wiimotes report the IR position in "wiimote space" not world space.  You need to convert these numbers back into world space.  Since the accelerometers get affected by rapid movement, you will need to rotate the IR positions to world space using the angle between the two IR dots.

    You will probably need to use the accelerometers to disambiguate between various situations.

  • User profile image
    Clint

    @Shane, @Alphasuede - that's what I get for replying and not reading closely enough.  Yes, @Alphasuede is entirely correct.  If you want the rotation of the Wiimote to not affect the reported x/y position, you need to get the roll/pitch of the Wiimote and use that to map the coordinates back to something meaningful.  Here's a link with some more information:

    http://wiibrew.org/wiki/Wiimote/Pointing

  • User profile image
    Marschal

    Hi.

    First of all thx for the lib.

    I've connected my wiimote to my PC an tried the wiimotetest.exe. This worked great. But i want to code my own programm and i want to use this dll. My problem is that i don't know how tu use the dll, or how to use the functions of the dll.

    Btw i'm using cpp.

    Would be nice if s.o. could help me in this case;)

  • User profile image
    Clint

    @Marschal, to use C++, you'll have to use Managed C++.  But doing the rest is semi on you.  Add in the reference to the DLL and it should work just like c# or VB.Net

  • User profile image
    WeeblBull

    Thanks for the great API - I'm eager to use it.

    One question though - I don't recall seeing pitch/roll/yaw values and wondered if these can be derived somehow?  I know that roll (and pitch to an extent) can be taken from the IR sensor but is there an easy way for me to get the angles that the wiimote is held at?

    WiiMouse is a great app that is able to use the angle to move the mouse (if 2 is held) so I'm guessing this is possible?

    Thanks!

  • User profile image
    Clint

    @WeeblBull, you can't really get a true yaw value out of the Wiimote unless you use the IR source and the Wiimote is held parallel to the ground.  Even then it's not very accurate.  The Wiimote itself contains accelerometers, not gyros, and without gyros, you can't determine all 3 axes of rotation.  That's where the MotionPlus comes in, which the next version of WiimoteLib will have better support for.

  • User profile image
    Clint

    @prabhakar pal, to do finger tracking, add little reflectors to the end of your fingers.  Johnny Lee has a good example using the WiiMote lib.  http://johnnylee.net/projects/wii/

  • User profile image
    prabhakar pal

    how i  made tracking  fingers  using wiimote how i got tutorial abt that plz send me information about that as soon as possible....

  • User profile image
    robWiimote

    Great job!!

    This is an application that uses your lib for high speed robots:

    http://www.youtube.com/watch?v=vxZ5n2tnqOU

  • User profile image
    TJ

    If you inconsistently get the error: "Error reading data from wiimote ... is it connected" .. Try changing the batteries..

    After about %40 the signal got choppy, and the error messages got more frequent using the MS stack. Hope This saves some one time!

  • User profile image
    Pablo

    Hello. Excelent library !

    I have an issue when I'm trying to run my own application.

    My application can't recognize the Wiimote and it throws an exception:

    if(!mStatusDone.WaitOne(3000, false))

     throw new WiimoteException("Timed out waiting for status report");

    Has anyone have had the same problem?

Add Your 2 Cents