Thursday, September 23, 2010

Instructions on How to Use a Wiimote in Ubuntu


Requirements: You need a wiimote, a Bluetooth dongle, Ubuntu 9.10 or higher (will work on lower version just not these exact instructions).
Recommended: Source of infrared light, candles are cheap and easy to use or you can use and infrared LED like I do.

Step One: Add the WiiCan PPA
                                sudo apt-add-repository ppa:wiicanteam/ppa && sudo apt-get update

Step Two: Install WiiCan
                                sudo apt-get install wiican

Step Three: Navigate to WiiCan and try it out.
                                Applications -> Accessories -> WiiCan,

You should see a wiimote icon next to the volume control, generally on the right side of the upper panel.  Click this and select mouse. Hold down the wiimote buttons 1 and 2, until the LEDs start to flash.  It should connect and you are in business.  Now try disconnecting and reconnecting and closing WiiCan and doing it over again.  If it still works after that you are set if not procede to the next step.  (WiiCan only works the first time I connect after I install then freezes up and gives me errors every time after).
Step 4: So, if WiiCan does not work like it should, use sudo wminout, in the terminal.

Optional: If you want it to connect faster get your wiimote’s MAC address and place it behind the wminout command.
                                Type 
                                lswm
                                Then hold down the 1 and 2 buttons on the wiimote
                                sudo wminout XX:XX:XX:XX:XX:XX <- MAC address returned from previous command.

Optional Configuration:  There are many files that can be used with your wiimote found in the /etc/cwiid/wminput folder.  By default for both WiiCan and wminout the default file is used (listed as mouse in WiiCan).  To change anything in WiiCan or add another configuration file just simply right click the icon and go to properties, then add or edit a file (check out the files in /etc/cwiid/wminput and just copy and paste one you like).  For wminout, you can simply put –c followed by the file name you wish to use.  Example; wminput –c mouse.  Any custom file you want to make just add to the /etc/cwiid/wminput or edit one of the already existing.

For more information about the commands you can use type man wminput in the terminal.