Wii Presenter

Kevin Chiu
Columbia University
New York, NY
USA
kgc2113@columbia.edu

Abstract

In this project, we developed an easy to use mouse control and presentation system based on the Wii Remote.

Introduction

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.

Related Work

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.

 

Background

Wii

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.

Wii Remote



The magic of the Wii lies in its controller. Unlike any other widely distributed game controller that we are aware of, it contains both a 3-axis accelerometer and a high frame rate, high resolution infrared camera all packaged into a wireless, wand-like form factor. The camera in the remote detects infrared (IR) sources at 100 frames per second at 1024 x 768 pixel resolution and has an approximately 45 degree field of view. The retail price of the controller is $39.99 USD. However, third party alternatives can be had for roughly half the price.

Wii Sensor Bar

The sensor bar acts as an IR light source for the Wii Remote. The Wii Sensor Bar contains IR light emitting diodes (LEDs), two angled towards the center, and two angled outwards. The multiple LED array is used to compensate for the relatively narrow cone of light that is emitted from each individual LED. The Nintendo bar is not sold separately from the console, but stand-alone third party solutions are available for $10 USD to $20 USD and functionally identical DIY sensor bars can be made for less than $10 -- all you need is a pair of sufficiently strong IR sources, even a pair of candles have been shown to work.

Architecture

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.

Further documentation for the WiiRemoteJ library can be found here.

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.

Path of Execution

The main class is MouseControlDemo. The main function detects the remote, initializes the remote and the debug view, if enabled, and finally maps the Wii Remote input to the computer's mouse and keyboard.

When new events from the controller arrive, they trigger the functions implemented in IRInputReceived and accelerationInputReceived. IRInputReceived conditions the input using the Smoother class, and then assigns the conditioned location information in a class variable, where it is later read in conjunction with the accelerator data to determine mouse position on screen.

Program Documentation

System Requirements


Installation Instructions

The program is available here.
There is no installation necessary. The executable is fully self contained. On most platforms, the user can simply double click the program's icon.

To enable debug mode, start the program with the "debug" (without quotes) parameter in the command line with the following syntax.

java -jar /path/to/executable.jar debug

Setup

The Wii sensor bar should be positioned directly below the screen with the LEDs facing forward, towards the audience.

Note that explicitly pairing the remote with your computer is not necessary.

Operation

Start the application and press the 1 and 2 keys simultaneously on the Wii Remote. The lights on the Wii remote should flash for a few seconds before reaching a stable state in which only one indicator light is on. Then stand a few feet away and point the Wii remote at the sensor bar. The mouse should move around. The buttons should now map to mouse and keyboard inputs as follows.

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.

Program Internal Operation

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.


The program also relies on BlueCove for blootooth communications.

Things that Do Not Work

If you are standing too close to the sensor bar, the Wii Remote will not be able to control the mouse effectively. This is due to the Wii Remote's narrow field of view. Once the IR source leaves this field of view, it can no longer be tracked.

Useful Enhancements

It might be interesting to have multiple cursor support using multiple Wii Remotes that are passed around a classroom.

Acknowledgments for code and ideas borrowed

The WiiRemoteJ library does most of the heavy lifting.

Task List

References