This 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
Which component are present on the controller?
- RF unit
- Infrared Camera
- 4 LED
- Force Feedback
- Memory Flash
- Control Registers
- Port Expansion
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
00:17:AB:39:8E:05 Nintendo RVL-CNT-01
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.
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.
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.
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.
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.
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
EEPROM (16KiB) used for:
- Accelerometers Offset
- Mii data
Memory (RAM 5.5KiB) used for:
- Control Registers
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 + +
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,
- Pointer with IR tracking
- Pointer with accelerometers (to detect the tilt of the Wiimote)
- Simple joypad
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.
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
- Natron an open source compositing software for linux.
- Yum and repository tools by examples
- Linux Games: Natural Selection 2
Find me on Google+