About
The Essential Reality P5 Glove is a cheap full-featured Virtual Reality glove. It has 5 bend sensors, one per finger, 4 buttons A, B, C, and D (D doubles as the power button), and a tracking device that tracks the 8 IR LEDs on the glove to calculate the glove's position and orientation. It also acts as a 3-button USB mouse when mouse-mode is turned on.
You can use it for input in GlovePIE, and you can also change some of its settings.
Control Panel Settings
You can turn mouse mode off for all P5 Gloves from the GlovePIE menu with CP-Settings > Turn P5 Mouse Mode Off. You don't have to do this, you can still use all VR features of the glove while it is in mouse mode, but it can be annoying having the glove control the mouse. Also the GUI will automatically detect finger bends and glove movement as a mouse input rather than a P5 input if mouse mode is switched on.
You can also adjust the other P5 settings from the GlovePIE menu with CP-Settings > P5. That will only work with a single glove at a time though. To calibrate or set up multiple gloves I recommend downloading the Dual Mode Driver and using VBControlPanel instead. If you are wearing the glove on your left hand, or you have the receptor at a funny angle or location, you will also need to create a p5dll.ini file in your GlovePIE directory. You will need to download the Dual Mode Driver to see how to do this.
GUI
You can use the GUI with the P5 Glove. For example... to make a script that presses Enter when you bend your index finger:
First turn mouse mode off from the CP-Settings menu.
Turn the glove on (with the D button) so the red light is on.
Click on the GUI tab.
Press the "Detect Output to Emulate" button.
Press Enter.
Press the "Detect Input" button that appeared.
Bend your index finger.
Make sure it says "Glove" and "Index" in the boxes. If not, repeat the "Detect Input" button and finger bend. When it is right, click the highlighted "Apply" button.
It is now done. You can run or save your script, or add additional inputs by clicking "Detect Output to Emulate" again.
You can also add things manually. Click "Choose Manually" if you can't see the manual entry boxes. Choose the Output Device in the "Ouput Device" box. If it is MIDI then you need to choose a channel, and a category. You then choose which item of the device you want to emulate. On the input side, choose "Glove" from the Input Device box. Choose a glove number (or leave it blank). And choose a part of the device from the "part of device" box. You can also type a 5-letter code in the box where each letter represents a finger, starting from the thumb. "l" for straight, "n" for bent, "r" for half-bent, "x" for don't care.
There are other more obscure values you can use by clicking on the "More..." button. All the extra items will be added to the drop-down box alphabetically (like "AbsoluteIndex"). The "More..." button will also make maths and function buttons appear.
For example, if you want to hold down the Left arrow key when the glove is more than 3 inches to the left, do this:
Choose the keyboard's left key from the boxes on the left hand side (it is near the bottom), or use the "Detect Output" button. Choose "Glove" and "x" on the right hand side, or use the "Detect output" button and move the glove sideways. Click the more button to make the other boxes appear. In the "Maths" button click the "<" less than operator. In the right hand side box type "3 inches" without quotes. In the "Units" box you need to change it to "Units" (at the top). Unfortunately the units box applies to the final result, not just the right hand side, so for comparisons you need to enter the units in the right hand side box and set the units box to "Units" for no units. Then click Apply.
You can also smooth values by choosing "Smooth" in the functions box.
NOTE: The P5 is listed as "Glove" in the GUI. "Glove" only refers to the P5 Glove, not other glove types.
Buttons
The buttons on the glove are called A, B, C, and D. The D button also turns the glove on and off, and it only registers when you are turning the glove on. All the buttons (including the D button) can tell how long their are held down for. The buttons only work when the glove is visible to the receptor.
The button values will be True when the button is held down and False when it is up or not in range.
So to control a key with the buttons on the glove, write a script like this:
Escape = P5.A
You can also use combinations like this:
Escape = Shift+P5.A+P5.B
Fingers
The fingers on the glove are called Thumb, Index, Middle, Ring, and Pinky.
They have a value between 0 and 63. But if you use it with something that expects a True, False value it will be true when 32 or above and false otherwise.
0 means straight, 63 means bent.