Here is a video of our beloved Compiz Fusion being controlled by a WiiMote.
Sorry about the lack of updates on the blog recently, I have been quite busy but there is a lot of new stuff to talk about 🙂
Anyways, for the howto. Most of the instructions are on the video but here are some prerequisites:
- First of all, Compiz Fusion if you don’t have it already
- You’ll need a working Wii Remote too. Nintendo sells these separately from the Wii Console if you don’t have one (Which is good, due to the Wii Shortage that there is now ;-))
- You’ll need a working bluetooth interface too. I found that my integrated bluetooth card just did not want to work, so I went a bought an external adapter. The cheapest I could find was around 50 Australian Dollars, don’t know about anywhere else. You can check to see if your Bluetooth works later in this post.
- Finally, you need to go get libwiimote from the CWiiD project.
- Once that is compiled an installed we need to check a few things:
dmesg | grep Bluetooth
Should yield something like:
Bluetooth: Core ver 2.11 Bluetooth: HCI device and connection manager initialized Bluetooth: HCI socket layer initialized Bluetooth: HCI USB driver ver 2.9 Bluetooth: L2CAP ver 2.8 Bluetooth: L2CAP socket layer initialized Bluetooth: RFCOMM socket layer initialized Bluetooth: RFCOMM TTY layer initiali ...
If it doesn’t , execute
sudo modprobe bluetooth
If it still doesn’t, trying installing bluez firmware,
If it *still* doesn’t then you will have to get a new bluetooth adaptor.
Once bluetooth is working, you need to do the following
sudo modprobe uinput wminput
(Note that modprobe and wminput are separate comamnds, but wordpress likes to murder the line break :-|)
Turn of your Wii Console off if it is on, and hold down (1)+(2) on your remote. Once it says ‘Ready’, you should be able to move the mouse around by tilting the remote. If you have a wireless sensor bar, a pair of infra-red lights or some candles, you can use
wminput -c ir_ptr
to enable the infra-red camera. Note that this doesn’t play so nice with compiz because as soon as you rotate the cube, the cursor will warp and be out of sync with the WiiMote.
Here is a video of it in action
– SmSpillaz
WoW!
I ‘m going to order a Wii Remote these days and try it out 🙂
Is it useful at all or just for fun?
Ah, Popcorn, those good old times 😛
Me wants to write a wiimote plugin.
awesome… one question, did you hear about johnny chung lee wiimote project (http://www.cs.cmu.edu/~johnny/projects/wii/), can use it this to do something similar? ( maybe you could work together whit him, i don’t know )
Which video editor did you used?
Maybe kdenlive or something different?
wminput give me :
Put Wiimote in discoverable mode now (press 1+2)…
No Bluetooth interface found
unable to connect
And I have, for dmesg | grep Bluetooth :
[ 54.512205] Bluetooth: Core ver 2.11
[ 54.512936] Bluetooth: HCI device and connection manager initialized
[ 54.512949] Bluetooth: HCI socket layer initialized
[ 54.548915] Bluetooth: L2CAP ver 2.8
[ 54.548924] Bluetooth: L2CAP socket layer initialized
[ 54.578873] Bluetooth: RFCOMM socket layer initialized
[ 54.579548] Bluetooth: RFCOMM TTY layer initialized
[ 54.579558] Bluetooth: RFCOMM ver 1.8
What’s the problem ? 😉
I feel like you could really do some neat stuff with a wii remote as an input device. For example, you could tie minimization or “shelving” to a quick flick of the wrist towards the outside, away from the screen screen, like you’re tossing the window away. A flick inside could be used to shuffle through windows. A flick forward could be the replacement for clicking. Its a control paradigm that might be better than the mouse, or at least a nifty compliment to it.
Great thank you for the tip, it’s very easy to setup 🙂
haha, pretty neat!
from the looks of it, you are in a pretty neifty room.
Might want to un-shine your screen abit
Your Video is Artwork! 🙂
I love it!
An great demo about linux flexibility, and a wiimote could leave on trash to mouse ja ja ja.
Just wondering. The wiimote headtracking can also be made through a simple webcam using opencv.
I’ve got an old video about that here http://danielbaggio.blogspot.com/2008/01/webcam-opengl-opencv-head-tracking.html
I’m now able to easily do 50 fps with an option to recognize a single head.
Besides that, I’ve seen that eyetracking is also possible with the webcam.
Just wondering if applying this idea to Compiz would be interesting.
What do you think?
Seeing the whole desktop as it really would look as soon as you get your head around. Maybe for scientific applications… 🙂
I have the same problem Zic has: “No Bluetooth interface found” but the wiimote is detected by kdebluetooth with no problem. Do you know what could be the problem?