PDA

View Full Version : Wii Remote Communication API



wraggster
December 26th, 2006, 10:55
News from WiiM (http://digitalretrograde.com/projects/wiim/):


Wiim ("whim" or "wheem", if you prefer) is a simple set of C++ classes that allow you to connect to your Wii remote through Windows' HID interface to send and receive commands. Right now you can receive button presses and motion data as well as set rumble and LED status. There's no support for IR or any extension devices yet. Miis are another possibility, but they're already well supported elsewhere.

Demo

Disclaimer: This is barely "alpha" software. If you choose to download and use it, I am not responsible for anything that happens to your computer as a result. I don't offer any support but the code is available for your edification.

This demo is an homage to Lunar Lander. It only has one level, so I wouldn't really call it a game. It's only playable with a Wii remote.

Instructions

Roll left and right to tip your lander. Press 'A' to fire the thruster. 'Q' quits and 'R' resets. Try to set down gently on the landing pad in yellow. Don't touch the edges of the screen or the terrain or you'll explode. (By explode I mean turn your lander red.)
Running / Building
I've only been able to test this on my setup using the BlueSoleil Bluetooth Stack and a cheap Zonet Bluetooth adapter. If you're able to use GlovePIE, you should be able to run this program. Make sure the Wii remote's connected and you're able to connect to the "Bluetooth Human Interface Device" Service. If you have success, let me know!

If you're interesting in using the library for development there are a few prerequsities you need to have. The demo also uses SDL, so you'll need to have a copy of the latest SDL DLL. I've included an SDL_gfx project with the files slightly modified to build a DLL with Visual Studio.

In addition to this polling mode, there is another event-driven mode which is still in development that will let you subclass the Wiimote class to receive event notifications liked ButtonPressed(Button) and ReceivedMotionData(MotionData).

More Info at link above.