<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-8342903261382138056', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



Rotating the compiz cube with the Wii mote (VIDEO INCLUDED)

Friday, December 29, 2006

Today, David has brought his Wiimote at Mandriva office so that we make some experiments with the Wiimote linux drivers. I've started with WMD, which is a python program that can generate input events based on the info sent by the Wiimote (on Bluetooth). It just required python-xlib and pybluez to run (I've uploaded packages in Cooker), to load the uinput kernel module, and to configure it in WMD config.

Since I don't have a sensor bar here (and haven't found time to build one), I can only use the accelerometer info. I've wrote a quick patch for WMD to send button events when a reasonnable acceleration is detected on the Wiimote X axis (see the motion analysis).

By mapping the relevant buttons on Ctrl+Alt+Left on Ctrl+Alt+Right, it gives a nice result in compiz: the Wiimote makes the 3D cube rotate \o/
This is awesome! Read more @ blino. Digg this!


Wii-compiz
Uploaded by blino
posted by linnerd40, Friday, December 29, 2006


0 Comments:

Add a comment