How to Control Your Computer with a Wii Remote Using Glovepie

In this, I explain how to control your computer with a Wii Remote using GlovePIE, a free download program.

Before you start, make sure you have everything you need.  You will need:

1. GlovePIE, available here: http://download.chip.eu/en/GlovePie-0.30_174835.html

2. A Wii Remote, you don’t need a Wii for anything, just the remote, a nunchuck isn’t required but will give you more buttons to work with and a joystick for things like controlling the mouse

3. A Bluetooth enabled computer or a Bluetooth dongle, check your manual or look online to see if your computer has Bluetooth.  If not, you can get a cheap Chinese dongle for $2-3 on eBay

Now we can get started.  First, connect your remote to your computer.  This method will be different for different computers, but the easiest way is to go to your Bluetooth settings (you can get there quickly by clicking Bluetooth under the CP-Settings menu in GlovePIE).  Just go through the steps making sure that you select no passcode when asked because there is no way for the remote to input a passcode.  When your computer says it is searching for device, press and hold the 1 and 2 buttons on the remote at the same time until the LEDs are blinking which will cause your remote to search too.

Once the devices are paired, we are ready to begin making our script.  The easiest way to do this is with the GUI tab in GlovePIE.  Simply click “Detect Output to Emulate” and then do on your computer what you want to be able to do with your remote, like click the mouse.  Now click “Detect Input” and do on your remote what you want to be able to do that will output what you selected, like press the A button.  Then click “Apply.”  Now, when the script is running, whenever you press the A button on your remote, it will click the mouse.  You can repeat this process for things like right clicking and you can set it to any button. You can even set buttons to do things like open your email, or your internet browser, but you have to select that manually.  Just click “Choose Manually” instead of “Detect Output to Emulate” and select what you want from the list.

You can make your script completely like this.  Once your finished, just hit run and that’s it, your Wii Remote can now control your computer, but there are also a few more advanced things you can do.

You can also map it to will operate the vibration (rumble) on the remote, but you have to do this fully manually.  Go to the script tab which is titled whatever the file is saved as.  Here, you can type the script.  For the rumble, all you have to do is add a line “wiimote.rumble = 1″ when you want it turned on and a “wiimote.rumble = 0″ when you want it turned off.  You can also make it rumble when a button is pressed, like “wiimote.rumble = wiimote.A”.

You can control the LEDs on the remote too.  Add a line “Wiimote.leds = *”  Where the * is can be a number 0-15.  Each number is a different combination of LEDs.

One more thing you can do, which is common in all types of programming, is if then statements.  It is very simple.  Just add a line “if x then y else z” where x is a condition and y is what happens if the condition is true.  For conditions, if you want to see if a button is pressed, you say “if pressed (wiimote.A)”  Z is what happens if the condition is false.  You don’t have to use else.  If there is no else and the condition is false, the line will simply be ignored.

Variables are also very useful in GlovePIE.  variables are defined typed as “var.*” the * is the name of the variable and can be just about anything.

That’s about it.  To make the most use of the if then statements and variables, it will be good to know a bit about general programming.  Combining everything can create an extremely efficient and dynamic script that can be fun and useful.  One script that I made can be found here: http://computersight.com/programming/a-useful-glovepie-script-for-controlling-your-computer-with-a-wii-remote/.

One Response

09.08.01

Like many others I was looking for an easy “how to” about making music with my WiiMote, I couldn’t find it so I wrote my own. Check my website:
http://www.winko-erades.nl/

Regards,

Winko

Leave Your Response