Wiimote API's

From EQUIS Lab Wiki

Jump to: navigation, search

Several API's under development allowing PC applications to control the Wii Remote (Wiimote.) The Wiimote communicates with a PC using Bluetooth. A Wiimote API is a device driver that establishes a Bluetooth connection to the Wiimote, using the Bluetooth HID (Human Interface Device) standard.

Wiimotes provide several forms of I/O, including:

  • Input: 6 dimensions of accelerometer data (x, y, z, pitch, yaw, roll), pointing data, 12 buttons
  • Output: force feedback, four LEDs, speaker
  • Other: storage/retrieval of Miis

Wiili.org provides excellent technical overviews of the Wiimote and the Nunchuk. CNN Money provides a component-level view of the Wiimote's internals.

The available API's support different subsets of the Wii's functionality.

Hardware

One or more Wiimotes are required. Some libraries also support the Nunchuk attachment.

To use IR pointing, a sensor bar is required. The Wii's own sensor bar can be used. The sensor bar is simply a set of LED's that provide an IR light source, so one can also be hand-constructed. Wiili reports "The sensor bar is powered by the Wii base unit, and contains 2 groups of IR LEDs, spaced 7.5 inches apart. Each group is composed of 5 LEDs, but homemade sensor bars have been effective with fewer LEDs, so long as the intensity is sufficient."

Some people report problems with the Windows XP Bluetooth stack. Reportedly, the BlueSoleil stack may be better; caveat emptor.

The API's

These API's are all still in pre-release mode and have limited documentation. If you know more about the API's than is written here, please add to this information.

  • Wiimote API: "A library written in C to access the Wii Remote's abilities. Currently able to toggle LEDs and rumble, as well as use the IR sensor to control the mouse pointer. Can also map wiimote core buttons to the keyboard. A video of a gui using the API is here: long version / short version"
  • Wiim: "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."
  • RMX Automation: A Wii extension to RMX automation by mapping the Wii's buttons and IR pointing to mouse and keyboard equivalents. Does not appear to provide accelerometer data.
  • GlovePIE for the Wiimote: Provides access to most Wii features, including pointing, buttons, LED, sound, and limited accelerometer functionality. Some documentation is available on this forum thread.
  • CWiimote: "Features: Read Accelerometer, button values from the wiimote; Read Accelerometer, stick, and button values from the nunchuck; Preliminary IR support"
  • Managed Library for Nintendo's Wiimote: "In this article, Brian Peek demonstrates how to connect to and use the Nintendo Wiimote from C# and VB.NET. The final output is an easy-to-use managed API for the Wiimote that can be used in any managed application."

Related

Other interesting things:

  • The Wiili project is attempting to create a full Wii development environment for Linux. This project provides an astonishing wealth of technical information about Wii development in general.
  • This thread describes Wiisticks, a game written using OGRE that uses two wiimotes, based on the CWiimote library. There is a video.
  • Using the controller as an input device for a game will typically require some kind of gesture recognition software. Wiili discusses this problem. AiLive produces the commercial LiveMove product.