Wiimote with Linux
This week at work I've been lucky enough to get a new project. I've been attempting to get a Nintendo Wiimote to work with a Linux system so that we can use it as the new input device for our Renderwall. I was given (temporarily) a Laptop with RedHat Enterprise Linux 4 (OId, I know) with full root priviledges (but no network access) to work on.I got a DLink DBT-120 for the Bluetooth communication, and an el-cheapo wireless sensor bar. Plugging in the DBT-120 worked magically without any intervention from me (Linux hardware support has come a looong way). I pretty easily got the 'hcitool scan' to show the Nintendo Wiimote. Next step was to actually compile something usable for it.
I finally settled on CWiid (At http://abstrakraft.org/cwiid/). It has a good selection of demos and an API. To get it to compile, I did have to upgrade Flex (compiled from source) and install the bluez-libs-devel RPM to get the bluetooth headers. With that in place, everything works just great!
As a final feather in my cap, I setup wminput. it's a simple daemon that will let the Wiimote inputs emulate (via uinput) a Mouse & Keyboard, so I was able to use it to interact with our openGL demos without any code changes. It's all pretty slick and pretty easy to use.
So, where to from here? Well, I'm going to build a simple GLUT-type wrapper to work with the Cwiid API, so that we can get low-level access to the LED's, battery information, and tracking data. With that, I should be able to pretty easily gather a set of demos that we can use to show visitors! I'll post back more as I get more stuff working!
Technorati Tags: wiimote, linux, programming, cwiid

