Small fun perl scripts that use the Nintendo Wiimote
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


First version: 14/5/2010

A small set of simple and funny scripts that are
meant to be used with a Nintendo Wiimote controller.


* perl 5.8+

* libcwiimote
  (install with 'sudo apt-get install libcwiimote-dev'
  if you're using Debian/Ubuntu)

* the Linux::Input::Wiimote perl module
  (install with 'sudo cpan Linux::Input::Wiimote')


All the scripts below will wait for the wiimote to be put
in discoverable mode when they start.

So, run any of the scripts like the following:


and then press both the '1' and '2' keys together
on the wiimote. This will usually cause the script to
connect to the wiimote. You will see leds blinking.

The script is connected. Do something. Press random
buttons or pretend you're playing drums. Something should
happen... :-)


* wiimote-drumkit

    This is something I made for my small kids, so they could
    just play with sounds. You can write a small config file to
    assign random mp3s/wav/... to each button of the wii.

    Take a look at drumkit.conf or animals.conf as examples.

    Then each time you press a button, or wave the wii in the air
    (pretending you're playing drums), you will hear the corresponding

    Requires 'paplay'.

* wiimote-joystick

    This is a quick hack that I put together to use the wiimote
    together with any of my favorite games as a digital joystick.

    I can use it to play with mame, of course with legal roms
    or c64 emulators (with games I of course owned when I was a kid)
    and so on.

    Currently it works well with a few games, because of the way the
    keys are sent to X11, and it works really bad with other games,
    because of the way the keys are sent to X11.

    Requires 'X11::GUITest', install with 'sudo cpan X11::GUITest'.

* wiimote-conductor

    Can control the speed of a movie or song by pretending to
    use the wiimote like a orchestra conductor would.

    It's a bit sucky because it doesn't get the actual tempo
    from the sound, so you have to pretend the normal (1.0x) speed
    is represented by wii-beats distanced by 1 second.

    So if you want to double the speed of the movie/song, you
    have to move the wii in the air every 0.5 seconds.

    Pretty lame, eh? :)

    Requires 'Audio::Play::MPlayer' with a patch to add
    the 'speed' command.