GlovePIE:GlovePIE
From WiiLi
For additional scripting information, such as syntax help, please see How To: Write GlovePIE Scripts and GlovePie Scripting. For scripts, see the script database at GlovePIE Scripts
[edit] Donations
Please help support GlovePIE development by donating to CarlKenner, the author of GlovePIE.
GlovePIE is an application specifically designed to emulate Joystick and Keyboard input from a variety of devices. This software is written by WiiLi forum member CarlKenner, who has also programmed the application to handle input from the Wiimote. It is distributed in the software MyMiiManger but there are other distributions.
Contents |
[edit] History
Originally designed for the Essential Reality P5 Glove, hence the name GlovePIE (Glove Programmable Input Emulator), it has expanded to a variety of different controllers, such as the Wiimote.
[edit] Requirements
To use GlovePIE with the Wiimote, here is what you will need...
- GlovePIE version .22 or higher (some functions in this guide are based on later versions)
- A Wiimote
- A Bluetooth enabled PC running Windows 2000, XP, or Vista
- DirectX 8.0 or higher
To install, simply download the ZIP file and extract anywhere you want. Double click the GlovePIE.exe file to run the program. In order to associate .PIE files with GlovePIE, you will have to perform this manually via the Folder Options in Windows Explorer.
[edit] Working Bluetooth Stacks
Main Article: Compatible Bluetooth Devices
See Also: HowTo:BlueSoleil
You also may need to update your Bluetooth drivers. There have been reports that the standard Microsoft Windows Bluetooth stack isn't completely compatible with the Wiimote. Try your computer vendor's site or download the BlueSoleil drivers. NOTE: The free demo of this driver has a 5MB communications limit. You would need to buy it to remove this limitation. Edit by Fluffman - The 5MB limit doesn't seem to affect Glovepie or Wiinremote usage, at least not for me. This will run out after transferring 5 mb though, so watch out.
It is possible to pair the Wiimote to the PC on Windows Vista with the standard Bluetooth stack. Instructions can be found here. Note this does also work under WinXP SP2.
[edit] Interface
The interface resembles a text editor. To use GlovePIE you need to write some simple scripts that correspond to specific keys and/or buttons. These scripts share a similar syntax with Java (for Strings) and BASIC (if, then, else, endif).
Individual lines can end with a semicolon (;) if preferred. You can use C or C++ style comments in your code.
For example, if you wanted to assign the Wiimote's A button to a left-click on the mouse and B for the right-click, simply type this command in and press Run:
Mouse.LeftButton = Wiimote.A Mouse.RightButton = Wiimote.B
If you want to debug various variables, such as the motion sensing in the Wiimote, set the debug variable to be equal to a quantity:
debug = 'X=' + Wiimote.RawForceX + ' Y=' + Wiimote.RawForceY + 'Z=' + Wiimote.RawForceZ;
To assign a button on the Wiimote to a key, you could use this script, replacing the key (Key.Q) or Wiimote button (Wiimote.A) with whatever you wish:
Key.Q = Wiimote.A
[edit] Wiimote
In addition to button presses, you can also utilize the Wiimote's motion sensing for moving the mouse cursor or performing gestures.
The available inputs currently for the Wiimote as of version 2.5 are
Example for Wiimote script:
Wiimote.A Wiimote.B etc...
[edit] Buttons
A B Plus Minus Home One Two
[edit] Control Pad
Up Down Left Right
[edit] Acceleration
RelAccX RelAccY RelAccZ or RawAccX RawAccY RawAccZ
[edit] Sensor Bar
dot1x dot1y dot1size dot1vis dot2x dot2y dot2size dot2vis dot3x dot3y dot3size dot3vis dot4x dot4y dot4size dot4vis
[edit] LEDs
Leds Led1 Led2 Led3 Led4
The LEDs are each individually controlled by a single bit. You can either set the variable Wiimote.Leds to a number between 0 and 15 or set the individual LED (Led1, Led2, Led3, Led4) to true to turn on that LED.
[ ][ ][ ][ ] = 0
[♦][ ][ ][ ] = 1
[ ][♦][ ][ ] = 2
[♦][♦][ ][ ] = 3
[ ][ ][♦][ ] = 4
[♦][ ][♦][ ] = 5
[ ][♦][♦][ ] = 6
[♦][♦][♦][ ] = 7
[ ][ ][ ][♦] = 8
[♦][ ][ ][♦] = 9
[ ][♦][ ][♦] = 10
[♦][♦][ ][♦] = 11
[ ][ ][♦][♦] = 12
[♦][ ][♦][♦] = 13
[ ][♦][♦][♦] = 14
[♦][♦][♦][♦] = 15
[edit] Rumble
Rumble
To make the Wiimote rumble, simply set the rumble variable to TRUE, or set its value to 1
Wiimote.Rumble = true; or Wiimote.Rumble = 1;
If you wanted to make the Wiimote rumble when a specific button is pressed, simply replace true with the appropriate button(s) or key(s):
Wiimote.Rumble = Wiimote.A && Wiimote.B
[edit] Speaker
To use the Wiimote speaker, you have to set these values:
Frequency, Volume
A frequency(Hz) of 0 will turn the speaker off. Anything other than 0 will turn it back on again. Volume is a value between 0 and 2 for 0 - 200%. You can also mute the speaker using the following commands:
Speaker, Mute
Setting Speaker to true turns on the speaker slowly, false turns the speaker off slowly. Setting Mute to true mutes the speaker, false unmutes it. You do not have to unmute the speaker if you set the Frequency because it automatically unmutes it. Mute is preferred to setting the frequency to 0 because it does it faster. You can also set the sample rate with this command:
SampleRate
GlovePIE supports sample rates around 3640Hz. Sample rates must be multiples of 280 and are added or subtracted from the default rate of 3640Hz. The sample rate will automatically increase if you set the frequency above 1820Hz.
[edit] Mii Data
See also Mii Data.
The Mii data can be retrieved from the Wiimote by the menu option Mii Data in the File menu.
[edit] Nunchuk
Syntax example for Nunchuk:
Wiimote.Nunchuk.CButton Wiimote.Nunchuk.ZButton etc...
[edit] Buttons
CButton ZButton
[edit] Joystick
JoyX JoyY
[edit] Acceleration
RawForceX RawForceY RawForceZ gx gy gz
For acceleration, the values gx, gy, and gz are preferred over the RawForce values because they do not require calibration. RawForce values need calibration because every Wii remote will report different values. Gx, gy, and gz values are calculated on gravity. These values are approximately 1/30 of the RawForce values.
[edit] Classic Controller
Syntax example for Classic Controller:
Wiimote.Classic.a Wiimote.Classic.b etc...
[edit] Buttons
a b x y L LFull ZL R RFull ZR Minus Home Plus
[edit] Control Pad
Up Down Left Right
[edit] Joysticks
Joystick 1
Joy1X Joy1Y
Joystick 2
Joy2X Joy2Y
[edit] WiiGuitar
Syntax example for WiiGuitar (same as Classic Controller):
Wiimote.Classic.a Wiimote.Classic.b etc...
[edit] Frets
a = Green b = Red x = Yellow y = Blue ZL = Orange
[edit] Strum Bar
Down = Strum Down Up = Strum Up
[edit] Buttons
Minus Plus
[edit] Joystick
Joy1X Joy1Y
[edit] Whammy Bar
R
[edit] Copyright Notice
This software is copyright (c) Carl Kenner, except for scripts by other authors. By using this software you agree to obey the following license conditions. These statements are exactly as written by Carl Kenner and do not reflect the views of the WiiLi project in any way.
- You can't make money using this software as part of a baseball simulation. This is for contractual reasons. But you can make as much money as you like using it for anything else.
- You may not use this software directly or indirectly for any military purpose. This includes, but is not limited to, training, research and development, controlling military hardware, directing military personel, or troop entertainment. You may not use this software anywhere on a military base or vessel. This applies to all versions of PIE.
- You may not export this software to Israel, or use it in Israel (including the occupied territories), until Israel has ended its occupation of the West Bank, Gaza Strip, Lebanon, Syria, and anywhere else it may occupy. If you try to run it in Israel it will give you an error.
[It seems to check for some IP/Language settings, for some it will work for others (like myself) it doesn't - never meant to dishonour the use of software but-then-again, no control of the developer :-)]
- Missionaries may not use this software. It may not be used for any missionary purpose. Or any other genocidal purpose.
- You may not use this software to cheat at online or multiplayer games. What constitutes cheating depends on the game and the server. Just using a different input device shouldn't be considered cheating, but complex scripted actions to make things easier may be considered cheating. Don't get GlovePIE banned, or you will hurt everyone who wants to play with a VR glove. But feel free to cheat at single player!
Note: The statement regarding receiving an error in Israel is in the license wording, but is a false statement on many machine configurations.
[edit] See Also
[edit] Links
- Facebook and Social Networking Applications Development
- GlovePIE Home Page
- Original Forum Post
- A collection of GlovePIE scripts for the Wiimote
- Home Pages
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


