Oct 232010
 

wiilinThis article is based on the slide of Daniele Napolitano, and on his presentation on Linux Day 2009.

The Wiimote is a revolutionary game controllers created by Nintendo for its Wii console and changed the concept of making the game player at the center of the physical interactions of the  video game.

While in the normal game controller maximum interaction with the game were the buttons and force feedback, we have motion and aiming sensors in the Wiimote, so the console  ”know” what they are doing and where is the player in relation to the TV.

So it is:

For the player: a game controller

For the geeks: a concentration of technology

Wiimote Anatomy

Which component are present on the controller?

wiimote

  • RF unit
  • Buttons
  • Accelerometers
  • Infrared Camera
  • 4 LED
  • Force Feedback
  • Speaker
  • Memory Flash
  • Control Registers
  • Port Expansion
  • Battery

Wireless Communication

The Wiimote uses standard Bluetooth for connecting and

acts as a normal HID device (without authentication), so use a reporting system (up to 100 per second) to communicate with the PC host.

To be visible you must press both buttons 1 and 2 or the synch button in the battery compartment.

With the hcitool command you’ll see:

$ hcitool scan

Scanning ...

00:17:AB:39:8E:05 Nintendo RVL-CNT-01

Buttons

The Wiimote has 11 buttons directly controllable.

Power button terminates the connection between the host and the Wiimote.

It seems there is no way to change this behavior.

Accelerometerswiimote2

The Wii remote has an accelerometer that works on the three spatial axes: X, Y and Z.

The range of detectable acceleration goes from -3G to +3G, with 10% sensitivity. The absolute value is encoded on unsigned 8bit.

IR Camera

wiimote4

For pointing to the screen the Wii uses the combination of an infrared camera on the Wiimote and Sensor Bar, that is, two groups of IR LEDs.

The camera can detect up to 4 points on a array of 1027×768 points. Uses 3 bytes for each point to determine position and size.

LED

The Wiimote has 4 LEDs used during the game to determine the number of players.

The LEDs can be driven separately but you can change their status (ON / OFF) at the maximum speed of around 1 time second.

Force Feedback

wiimote5

The controller itself has a small engine with a mass outside

axis to simulate a vibration.

The methods of control are available only on/off.

Speaker

In addition to this there is also a small speaker with a low quality of sounds used during the play of games.

This speaker is of poor quality and can reproduce sounds up to

4200Hz. Reproduction is in streaming from the Wii.

  • Playing streaming packet
  • It can reproduce sounds up to 4200Hz
  • The coding of the sound seems to be 4bit ADPCM

Internal Memory

EEPROM (16KiB) used for:

  • Accelerometers Offset
  • Mii data

Memory (RAM 5.5KiB) used for:

  • Control Registers

OSS implementations

The Cwiid library

On GNU/Linux has been created various libraries to access

easily to the Wiimote, one of them is Cwiid.

Cwiid allows you to search a detectable Wiimote using the

sub-standard bluetooth and connect.

It works on the following languages:

  • C
  • C + +
  • Python

wminput

This Cwiid based program allows you to create a new

input device controlled by the Wiimote through the module

kernel uinput (Userspace Input).

The program is designed to plug-in to a wide variety of uses,

where:

  • Pointer with IR tracking
  • Pointer with accelerometers (to detect the tilt of the Wiimote)
  • Simple joypad

gtkwhiteboard

This program is based on the work of Johnny Chung Lee can create an overhead projector with just a Wiimote and a special infrared pen.

If you already have a projector, with about 30/40 € more you can have an overhead projector that has nothing to envy to the commercial ones sold for a few hundred Euro.

Demo:

References:

Linux day 2009 Gulp : http://www.gulp.linux.it/wiki/Linux_Day_2009/Slide

Original video of Daniele Napolitano speech (in Italian) http://www.gulp.linux.it/~alberto/video/ld2009/wiimote_su_linux_ld2009_lq.ogg

Popular Posts:

flattr this!

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>