Last month I received a couple of e-mails from readers asking me whether I had a script to hook up their Guitar Hero World Tour Drums (GHWT) to MIDI. Although willing to help, I wasn’t able to pull this one of myself as I don’t own (such) a drum kit. So I wrote them back that I was willing to help, but that I needed their help as well. Happily someone called Fonz replied to my request, willing to help me write a script. So I wrote several scripts and Fonz would test the scripts whether they were working or not. This collaboration payed of… Although the scripts are not completely finished (work in progress), the results are MIDI recordable :-))
An article that appeared on the Create Digital Music website, about making music using the WiiMote and a computer, drew my attention. Several hints were given on the how to, but as always in doing new things the information was scattered everywhere and nowhere. After reading many articles and watching many videos I found out how to realize a working setup for myself. In this article I’ll try to explain the steps needed to create a working setup for yourself.
After having used GlovePie several times, I thought it would be handy to have a function that would auto calibrate my Wii remote. I couldn’t find a script or routine that did this, so I decided to give it a try.
A month ago I stumbled upon a program called Wiican. Wiican is a fantastic program, or to put it more correctly it’s a bunch of extremely powerful scripts, that makes your life easier using your Wii Mote in Linux.
Having my holidays within sight, I really didn’t have time to give it a close look before I took of to France. “Luckily” I had some time during my holidays (read: I had some rainy days) to experiment and discover the power of Wiican.
Prerequisites (what you need to get it working):
- Computer running Ubuntu
- Network connection
- Wiican installed (I’ll describe the installation of Wiican in a different article, because at this moment the installation struggles with some dependencies issues)
- Download and unzip the Wiican script I wrote
- Import the script within Wiican (details will follow when I’m back from my holidays)
- Start the script
- Hookup your WiiMote
- Start fragging some bots
Or you can try to write your own script within Wiican…
|Name : CUBE Game Gamepad
Comment : Control CUBE games using the Wiimote
Authors : Winko Erades
Version : 0.3# Wiimote accelerometer as mouse XY axis
Plugin.acc.X = REL_Y
Plugin.acc.Y = – REL_X# Wiimote buttons for movement
Wiimote.Up = KEY_LEFT
Wiimote.Down = KEY_RIGHT
Wiimote.Left = KEY_DOWN
Wiimote.Right = KEY_UP
# Wiimote buttons for shooting and jumping
And now start fragging!!! 🙂
Suggestions for improving this article are welcome, please let me know and drop me a line.
In my search for using the WiiMote as a musical instrument I found out it’s rather easy to setup your system to use the WiiMote as a mouse. Some of the steps needed to configure your system are actually the same, for being complete I’ll document all steps in this article.
Prerequisites (what you need to get it working):
Allright let’s get started :
Where possible I’ll provide the links to the necessary download locations.
You either have an pre installed bluetooth adapter in your computer or you can buy one in the shop (make sure it’s linux compatible).
As we’re using Ubuntu Studio, you can download the DVD Image and burn it to DVD.
Make sure you’ve got a Wii Remote with enough power.
Open a terminal session in Ubuntu then copy and paste the following instructions:
|sudo apt-get install libcwiid1 lswm wmgui wminput|
Sometimes it comes in handy to know your gear so at this point, you can turn on the Wii remote to scan by pressing 1 and 2 simultaneously (all the lights will flash) then running:
After you installed the necessary packages, you we’ll be able to give it the first shot by entering wmgui in a terminal window
Select “connect” from the file menu, press 1+2 on the Wiimote when prompted then click OK. Lights and rumble can be turned on and off from the controls menu, and which inputs are displayed from the settings menu. Using this, you can test the IR camera (I didn’t have infrared lights so I used a candle (BE VERY CAREFULL WITH OPEN FIRE IN AND AROUND YOUR LIVING AREA not to set the place on fire)), the accelerometers and check the inputs from the Nunchuck or Classic Controller.
Now you know basic set-up is working (your computer running Ubuntu Studio, your bluetooth adapter, your Wii Remote and the “connection” between it all).
From here on things are different, from the article about using the WiiMote as a musical instrument (check here).
For using the WiiMote as a mouse we need a mouse emulator (a small program that converts WiiMote output to mouse output) the one we are going to use is called uinput.
Before being able to use uinput we need to load it into the kernel, this can be done in two ways: manually after every reboot or we can load it every time the system starts up.
Copy and paste the following instructions:
|sudo modprobe uinput|
Loading it up every time the system starts up by adding uinput into /etc/modules:
|gksudo gedit /etc/modules|
Edit and save /etc/modules (mine looks like this)
Now reboot your system if you choose the latter option (editing /etc/modules).
We need the MAC-address of our WiiMote, there are multiple ways of getting this address:
Now we can start doing our mouse thing by telling wminput to listen to the right WiiMote (telling the WiiMote to listen to which MAC address) (make sure you use your own MAC-address !!!):
|sudo wminput 00:24:F3:E3:E6:CD|
(if you get the following error “unable to open uinput” try using the wminput command in SU mode as you didn’t have enough rights to use uinput).
Now you’re ready to rock and roll!!
Two more things:
- You can close the terminal window if you want to
- If you’re ready using your WiiMote press the off button on your Wiimote.
Suggestions for improving this article are welcome, please let me know and drop me a line!