CWiid
From WiiLi
Contents |
[edit] CWiid Wiimote Interface
CWiid is a collection of Linux tools written in C for interfacing to the Nintendo Wiimote, including an event-based API, an event/mouse/joystick driver, and GUI/control panel.
CWiid development (repository, bug reports, wiki) is now hosted at http://www.cwiid.org or http://abstrakraft.org/cwiid/
[edit] Download
http://abstrakraft.org/cwiid/downloads/cwiid-0.6.00.tgz
Debian Packages: now included in debian !
Mandriva packages: included in Mandriva contrib repository
[edit] Description
The CWiid package contains the following parts:
- wiimote library - API to the wiimote.
- wmgui - GTK gui to the wiimote.
- wminput - an event/joystick/mouse driver for the wiimote.
- wmdemo - a minimal demonstration of the libwiimote API. (not installed)
[edit] Requirements
autoconf, awk, bison, flex, bluez-libs, gtk+-2 dev libs, uinput kernel support, kernel sources
- Debian/Sid, (K)Ubuntu 6.10 - autoconf, autotools-dev, libbluetooth2-dev, libgtk2.0-dev (for the GUI), flex, bison
- Gentoo - autoconf, gawk, bison, flex, gtk+-2.x, bluez-libs
[edit] Debian QuickStart
To get your wiimote running on debian in a hurry (on debian unstable), install libbluetooth2, and bluez-utils. then perform the above udev addition to /etc/udev/rules.d/020_permissions.rules. after that, as a user, you should be able to run "hcitool scan", hit your 1 and 2 buttons on the wiimote at the same time, and see the following:
demo@faiserver:~$ hcitool scan
Scanning ...
00:19:1D:7C:4D:E6 Nintendo RVL-CNT-01
now, download and install the .deb files from the above link, and install those (as root). After that, wmgui should see your wiimote. If you intend on using wminput, don't forget to load uinput, so that wminput can send input events to your system.
[edit] Feature Requests
User requested features (not guaranteed to be implemented):
- Accelerometer driven pointer movement (no IR bar) via the GUI.
- This is in there - run wminput with '-tacc' option to load the accelerometer tracking plugin. Is this a request for absolute tracking vs. relative? Answer: no, but I am a little confused as to why the option for this isn't in the gui. In fact, now I am starting to wonder what exactly the gui is for...
- wmgui is not a gui for wminput - it is a stand-alone program. Right now, it's mostly a demo with read/write capabilities although there are plans to add data logging and some other capabilities to aid in reverse engineering, plugin testing, and debugging. As of this writing (1/25/06), wminput is a command-line (only) program, although this will change as well.
- This is in there - run wminput with '-tacc' option to load the accelerometer tracking plugin. Is this a request for absolute tracking vs. relative? Answer: no, but I am a little confused as to why the option for this isn't in the gui. In fact, now I am starting to wonder what exactly the gui is for...
- GUI-driven key mapping (preferably on the fly)
- Load/save key maps from/to files
- If there is an easy method to 'reset' the input mapping in wminput without having to restart the program (through an internal api, or maybe dbus), then it should be rather trivial for someone to write an external program to change keybindings etc. It should probably be extended to other things as well (load/unload input plugins, calibration etc).
- In this case, a good idea would be to allow to save "Profiles" and be able to quickly pick one. A user could use a different profile for games, emulators, Beryl, OpenOffice presentations, etc. without hassle once configured. Maybe even toggle functions from the Wiimote from a chosen key, with OSD telling what profile is being in use.
- Load/save key maps from/to files
- Gestures
- Yaw as well as pitch and roll, or is this not being include a hardware limitation?
- Hardware limitation - the direction of gravitational acceleration is invariant under yaw rotations, therefore yaw is unobservable given only accelerometer outputs. From what I've read, relative yaw requires gyroscopes, which is why Nintendo went with the sensor bar.
- Meta keying within the driver, for using button B als a meta, but with the option to use Button B + A as second mouse button. Also roll based meta keying would be really nice.
- So something like Roll > 30 ° is shift, Roll < -30 ° is ctl? I'll take a look at meta key options for the next release.
- different placements of the IR-led-bar, I noticed I have to place it below my screen which is rather hard to do for my laptop and unhandy for presentations (you're usually aiming upwards). If you could define or maybe even align the wiimote with your ledbar this would be really nice.
- I think true calibration would be more useful. That way you could place the leds anywhere (within sight of the wiimote of couse) and just use the calibration to adjust. You could also get much more accurate pointing then.
- Mapping axis to keys: Nunchuck X+ to A, X- to D, Y+ to W, Y- to S would be great for FPS movement! (wiimote acc.X/Y being mapped to REL_X, REL_Y for aiming)
- Edit: Done a plugin for this: Latest source code.
- Key combination/sequence mapping: Allow buttons to map to CTRL+ALT+SHIFT+R, for example, or a sequence of keys like CTRL+K, X.
- Command mapping: Allow buttons to execute shell commands.
- Power button: Make the power button on the wiimote optionally kill the wminput daemon.
- RPM binaries. Mandriva only has an old version and does not have lbluetooth available. - Never mind, found it in bluez.
- Roll compensation for IR tracking. Currently the wiimote has to be level. I think this can be done using the position of the 2 dots in combination with acc input to see which way is up.
- Can be done using accelerometer. The wiiuse library does this.
- I don't think it can be done with the acc alone because that will be all over the place while waving the wiimote around. I think it has to use a fix on the 2 IR dots and then use acc input to complement that.
- Can be done using accelerometer. The wiiuse library does this.
[edit] Program using CWiid
- TransferMii : a simple mii transfer program with a GUI (latest : v6.1)
- Wii-lla: Allows control of DMX lighting using the Wii Remote.
- Wiimote PD external: Allows for using WII mote inside puredata
- 3D IR Detection: Uses two wiimotes to determine the 3d position of an IR source. It's fun too.
- Tetriis: OpenGL accelerated tetris like game with Wiimote controls.
- WiiOSC: little program to send out Wii data as OSC messages. Also allows to control LEDs and rumble.
Windows
cWiimote | GlovePIE | RMX Automation | Wiim | wiimote-api | WiinRemote | WiimoteLib | WiiYourself!
Linux
CWiid | WMD | Perlwiimote | libwiimote | lg3d-wii| Python HTDP Driver
OSX
DarwiinRemote | Remote Buddy | The Wiinstrument | Wiiji (download)
Multiplatform
WiimoteCommander | OpenPIE | Wiimote_Simple | WiiremoteJ | wiiuse | WiiJuce | WiiuseJ | Wii Device Library
PyBluez Scripts: Wiiewer | Wiimotecomm

