Using a Wiimote with Zinc

The best way to experience Zinc, in my opinion, is sitting back on the couch with your legs up, enjoying a nice cold beverage. But most of us don't have media center remote controls, so we have to deal with finicky wireless keyboards and mice or actually get up and walk over to our media PC to change what's playing.
If you own a Wii, all of that can change. With a simple flick of the wrist, you can navigate through Zinc's UI and browse all of your favorite movies and TV shows. How is this possible?
First, a little tech talk: Wiimotes communicate with the Nintendo Wii over bluetooth, a wireless communication protocol. Since bluetooth is an industry standard, many computers have built-in bluetooth receivers. Even if they don't have one built-in, USB bluetooth dongles can be purchased for less than $20. And that's all you really need for this hack.
The Wiimote works by pulling input from a built-in camera and motion sensor. The camera is used to determine position relative to two infrared lights on the sensor bar. Using that information, the system can determine where the Wiimote is pointed (fun fact: the "sensor bar" actually doesn't have any sensors in it; it's just a pair of LEDs). The motion sensor detects movement, which can also be used to roughly determine position in space.
The upshot of all of this is that you can use a free software package to make the Wiimote act like a wireless mouse. If you own a Wii, you'll want to leave it on so the lights on the sensor bar remain on. If you don't, you can get passable accuracy using just the motion sensors.
We recommend using Wiinremote to connect your Wiimote with your computer. It's free and open source. If you don't own a Wii, you can buy a Wiimote for $35 new and around $20 used. Sensor bars are also available for precision control, or you can hack one together yourself from cheap Radio Shack parts.
To get it working, you'll need to pair your Wiimote with your computer. On the Dells here at the office, there's a Bluetooth icon in the system tray that you can double-click to bring up a window with an "Add device" button (your system may differ). Right before the computer starts searching for new devices, hold down the 1 and 2 buttons on the Wiimote to put it into discoverable mode. When the Wiimote is detected, instruct the computer to add it as a new device, and hit 1 and 2 again to finish the pairing.
More detailed instructions are available at http://www.kudzuworld.com/blogs/Tech/20070817A.en.aspx. If you're using BlueSoleil (a different bluetooth stack), use the instructions at http://www.wiiprojects.org/bluetooth.html.
Once the Wiimote is paired with the computer, start Wiinremote, and start your Wii (or power up your sensor bar in some way). We recommend changing your preferences to use IR instead of motion detection. We also remapped the buttons so the home key launches Zinc, the - key does a browser back, and the 1 key is escape (to get out of fullscreen). By default, the A key is "mouse left click" and the B key (the trigger on the bottom) disables or enables Wiimote control of the mouse. You can use the directional pad to move around in menus, but use the + key to select instead of the A key.
Have fun, and tell us how it works for you!

