In this project, we developed an easy to use mouse control and presentation system based on the Wii Remote.
In this project, we developed an easy to use mouse control and presentation system based on the Wii Remote. In this report, we will discuss Related Work, the Background of the Wii Remote, the program's Architecture, Program Documentation, our Task List, and References.
The Wii Remote as Mouse source code can be downloaded here. The application has only been tested on Mac OS X 10.5. However, it should run on any platform that runs Java 1.5 and has Bluetooth capability.
There are many interesting works based on the Wii Remote's functionality. The most notable Wii experimenter in recent memory is Johnny Chung Lee. His Wii Whiteboard, an open source smart whiteboard implementation on the .NET platform, is widely known.
The original project proposal described a classroom presenter system by Eckert and Moore [1] which used a red laser pointer to control the presenter's mouse. In the original system, students had client programs that would allow them to control the presentation. Here is a diagram from Eckert and Moore's report which describes the system.
The Wii is a gaming console developed by Nintendo. Over 34 million consoles have been shipped since its release on November 19, 2006. Although it is officially a closed platform, the community that has rallied around the console has made great strides both in running custom software on the console and repurposing its controllers for novel projects.
The application is written in Java and and is about 250 lines long. It relies on two libraries, BlueCove for Bluetooth communications and WiiRemoteJ for Wii Remote communication. BlueCove is a partial implementation of JSR-82, a specification for the Bluetooth API for Java. WiiRemoteJ provides many classes and functions useful for interacting with the Wii Remote. The primary class used, the class that WiiControllerDemo is based on is called WiiRemoteAdapter. This class provides the following comprehensive interface with the Wii Remote.
The application is split into three classes. The WiiControllerDemo class is responsible for accessing the Wii Remote and setting up the mouse and keyboard bindings. The Smoother class implements a data structure that averages recent data points incoming from the Wii Remote. This has the effect of smoothing mouse movements. The DebugViewer class allows the developer to see a representation of the raw IR camera data coming out of the Wii Remote. The debug viewer can be activated by passing the parameter "debug" without quotes, when launching the application from the command line. By default, the viewer is deactivated. The Utils class contains a few very simple functions that perform conversions between Wii-specific and standard Java data representations as well as a convenience function for printing.
Wii |
Mouse or Keyboard |
Trigger | Left Click |
A | Right Click |
Up on directional pad | Up Arrow |
Down on directional pad | Down Arrow |
Left on directional pad | Left Arrow |
Right on directional pad | Right Arrow |
1 | Page Up |
2 | Page Down |
Exiting the program automatically shuts down the Wii Remote.
Internally, the program relies on the WiiRemoteJ library for accessing the Wii Remote's functionality. When the Wii Remote is detected, and input data is gathered, it is passed to a movement smoothing algorithm through a callback interface provided by WiiRemoteJ.