You can read or set the BlueTooth MAC Address which is stored in the Sixaxis, by using Sixaxis.BlueToothMAC. On a new sixaxis it will be "00:00:00:00:00:00". You should set it to the address of the bluetooth adapter on your computer. Then your SIXAXIS will be able to connect to that Bluetooth adapter. You will need to go into your bluetooth stack to find the address of your bluetooth adapter. You could also try setting it to the bluetooth address of any other device you want to pair the SIXAXIS with. Here is an example of how to use it:
debug = sixaxis.BluetoothMAC
if pressed(sixaxis.PS) then
sixaxis.BluetoothMAC = "00:10:C6:59:00:4A" // put your BT address here
Once you have set the BluetoothMAC, you can make the SIXAXIS discoverable by pressing the PS button.
Unfortunately when I try to pair the SIXAXIS using Bluetooth it keeps connecting and then disconnecting. I have never successfully paired the SIXAXIS via bluetooth. If you do get the SIXAXIS to pair via bluetooth, let me know how you did it. But GlovePIE does not support SIXAXES connected via Bluetooth yet.
Sometimes it stops working
If your SIXAXIS stops working one day, you can fix the problem by pressing the Reset button on the back of your SIXAXIS. You will need a pin or skewer or something like that. The reset button will not reset the BluetoothMac. You can set the BluetoothMac back to its original value by setting it to "" or "00:00:00:00:00:00" in GlovePIE.
NEW! PlayStation 3 BDRemote
The BD Remote is the PlayStation 3's Blueray Disc remote. It is a Bluetooth remote control, like the Wii Remote is. You need to connect it using your Bluetooth software before you can use it in GlovePIE. You also need to use the correct setting for Bluetooth Fix in the troubleshooter menu. It should be off for BlueSoleil, and on for Microsoft.
The BD Remote has many buttons, they will be either true or false. You can assign them to keys like this:
Escape = BDRemote.Eject
Here is the complete list of buttons:
Eject, Num1, Num2, Num3,
Audio, Num4, Num5, Num6,
Angle, Num7, Num8, Num9,
Subtitle, Clear, Num0, Time,
Blue, Red, Green, Yellow,
Display, TopMenu, Popup, Return,
Up, Down, Left, Right, Enter
L1, PS, R1,
L3, Select, Start, R3,
Rewind, Play, FastForward,
Prev, Stop, Next,
StepRev, Pause, StepFwd
Some buttons can be read while you're holding down multiple buttons, and some buttons can only be read when you're only holding down a single button.
The buttons which are also on a SIXAXIS or normal playstation controller, plus the Enter button (which is not on a SIXAXIS) can always be read even when you hold down multiple buttons. Other buttons can't.
You can tell when the user is holding down too many buttons at the same time with: BDRemote.TooManyButtons. It is true or false.
You can also tell which button is currently down by reading: BDRemote.Button which is 0 for no button, or a number between 1 and 254 indicating which button is down, or -1 for too many buttons.
You can tell whether any button is pressed or not with BDRemote.AnyButton which is either true or false.
There is also BDRemote.Exists, and BDRemote.Count.
NEW! XBox360 Controller
The XBox360 controller is a Microsoft gamepad that is only partially compatible with Microsoft’s DirectInput. GlovePIE can read it both as a joystick, or as an XInput device. XInput is Microsoft’s new alternative to DirectInput that only works on Microsoft gamepads.
I don’t have an XBox360 controller, so I haven’t GlovePIE with it yet.
Unlike its competitors, the XBox360 controller has no motion sensing. It has two analog sticks (joy1, and joy2), and two analog triggers (LeftTrigger, RightTrigger). The rest of the buttons are digital. The gamepad can also vibrate.
GlovePIE supports a maximum of four XBox360 controllers. They will be called XInput1, XInput2, XInput3, and XInput4. If you need more than 4, then you can read them as joysticks instead.
You can’t control the LEDs in the “Ring Of Light”. They will be set automatically to whatever the player number is. You also can’t use the home button.
XInput1.A, XInput1.B, XInput1.X, and XInput1.Y are the main buttons. They are either true or false.
XInput1.Back and XInput1.Start are the Back and Start buttons on either side of the ring of light. They are either true or false.
XInput1.Up, XInput1.Down, XInput1.Left, and XInput1.Right are the DPad directions. They are also either true or false.
XInput1.LeftShoulder and XInput1.RightShoulder are the (digital) shoulder buttons, and are true or false.
XInput1.LeftTrigger and XInput1.RightTrigger are the analog trigger buttons under the shoulder buttons. They will be between 0 and 1.
XInput1.LeftThumb and XInput1.RightThumb are the buttons that you trigger by pushing in the two joysticks (with your thumb). They are the equivalent of L3 and R3 buttons on a PlayStation controller (But don’t try this on a Wii Classic Controller).
XInput1.Joy1X is the horizontal input of the left joystick. It is between -1 and 1, with 1 being to the right. Joy1Y is the vertical input of the left joystick. Positive means down. You can also access it as a vector [x, y], with just XInput1.Joy1.
XInput1.Joy2X, XInput1.Joy2Y, and XInput1.Joy2 are the right joystick.
XInput1.ExtraButton1, and XInput1.ExtraButton2 don’t exist yet. But XInput allows for future controllers to add those buttons.
XInput1.Vibration1, and XInput1.Vibration2 control the vibration. You can set them to a value between 0 and 1.
XInput1.Exists is true if that controller exists. XInput.count is the total number of XInput controllers connected (0 to 4).
Concept 2 Rowing Machine
If you have a Concept 2 rowing machine, also known as an ergo, you can connect it to the PC via a USB cable (which it should have come with). It can be a PM3 or PM4.
You must run GlovePIE.exe as an administrator if you are using Vista! Otherwise the rowing machine won’t work.
That allows you to use it with programs like GlovePIE, or to update the rowing machine’s firmware.
Updating the rowing machine’s firmware is a good idea, because it downloads the Fish Game onto your rowing machine. The fish game is really fun and works when it is not connected to the computer. You can update the firmware from here: http://www.concept2.com/us/support/software/firmware/
To use the rower in GlovePIE, the following are available:
Rower.Distance: The total distance rowed, in metres.
Rower.Distance2: Another version of the above. May be slightly different.
Rower.StrokeState: The part of the stroke you are currently in. 0 and 1 correspond to the wheel starting up. 2 means pulling. 3 means holding. 4 means releasing.
Rower.Pulling: True when doing the pulling part of the stroke
Rower.Holding: True when doing the holding part of the stroke
Rower.Releasing: True when doing the releasing part of the stroke
Rower.Power: How hard they were pulling during the stroke. In watts (Joules per second).
Rower.HeartRate: Beats per minutes (if you have a heart-rate monitor) in “per minute”.
Rower.Calories: Total calories burned so far.
Rower.Cadence: Strokes per minute.
Rower.Pace: How many seconds it takes to row a kilometre.
Rower.Time: Current session time. Divide calories or distance by this to get rates.
Rower.Time2: Another version of the above.
Rower.Exists: True if the rowing machine exists.
Rower.Count: Number of rowing machines (of the same type).
Rower.Speed: Doesn’t really work that well. You need to use Smooth(Rower.Speed,30) for maximum smoothing. In metres per second.
You can get information about the screen, or screens, connected to the computer. Which may be important for controlling mouse pointers and stuff like that.
Use “Screen” to refer to the primary monitor, or use “Screen” followed by a number to refer to individual screens.
In theory you can now set the screen orientation. It doesn’t work for me, but that might just be nvidia’s, or Vista’s fault. Use it like this:
Screen.Orientation = 90 degrees
You can only rotate the screen by a multiple of 90 degrees.
NEW! Scrolling the entire screen
Wallpaper must be switched off and set to a solid colour for this to work!
This is mostly used for Virtual Reality Head Mounted Displays, but it may also be useful for other purposes. It shifts the entire screen contents in any direction, exposing new desktop space. This allows you to create a much larger virtual desktop that you can pan around, and spread windows over.
It is buggy, but still very cool. With a HMD you could be surrounded by a 360 degree desktop. You could then drag windows all around you and place them at points in space.
Use Screen.ScrollX and Screen.ScrollY, they are measured in pixels.
Screen.Width is the width in pixels, but you can also get the width in real units by writing something like:
debug = Screen.Width in cm
The Physical width will only be right for a single Plug and Play monitor you have connected.
Screen.Height is the height in pixels. You can also get the real units.
Screen.PhysicalWidth is a better way of getting the screen width in physical units.
Screen.PhysicalHeight is the same for height.
Screen.ViewableSize is the actual viewable size of the monitor. If it is a CRT monitor then it will be less than the advertised size, because the advertised size is always the size of the tube itself rather than the viewable area. If it is an LCD monitor, then it will be about the right size.
Screen.PixelsPerInch is the number of dots per inch that your monitor has.
Screen.WorkAreaWidth and Screen.WorkAreaHeight is the size in pixels of the work-area, which is all of the screen that isn’t covered up with the task-bar and other bars.
Screen.DesktopWidth and Screen.DesktopHeight are the size in pixels of the Virtual Desktop, which stretches across all monitors in a multiple monitor setup.
Screen.Left is the position of the left hand side of the screen in pixels, relative to the top left corner of the primary monitor. So for screen1 it will be 0, but for screen2 it may be something else.
Screen.Top is the position of the top of the screen in pixels, relative to the primary monitor.
Screen.Right is the position of the right hand side of the screen in pixels, relative to the primary monitor.
Screen.Bottom is the position of the bottom of the screen in pixels, relative to the primary monitor.
Screen.DesktopLeft is the position of the left hand side of the virtual desktop relative to the top left corner of the primary monitor.
Screen.WorkAreaLeft is the position of the left hand side of that screen’s work area (the parts not covered by the taskbar).
Plug & Play Monitor Stuff
These only work for a single Plug & Play monitor.
PlugAndPlayAvailable, ManufactureDate, EDIDVersion, EDIDRevision, PhysicalWidth, PhysicalHeight, VendorCode, ProductCode, VendorShortName, VendorLongName, SerialNumber, IsProjector, ViewableSize
ScreenSaverEnabled, ScreenSaverRunning, ScreenSaverTimeout
There’s lots of other stuff in the Screen object, mostly control panel settings.
The Window object gives you information about the currently active window. It is useful to find out which application is currently active, what size it is, and where it is.
The Window’s title can be read like this:
You can also read specific parts of the title:
You can read the window class name like this:
You can read its size like this:
You can read its position like this:
Many of the properties of the Window object are useless or don’t work. It is a work in progress.
FakeSpace Pinch Gloves
FakeSpace pinch gloves have two gloves with electrical contacts on each finger. So you can tell which gesture the user is doing by which fingers are touching each other.
They must be plugged into a serial, aka COM, aka RS232 port.
There is probably a switch on your pinch gloves control box that says which baud rate you want. If it is not set to 9600 then you need to add a line in your script like this:
Pinch.Baud115200 = true
Here is a list of supported baud rates: 1200, 2400, 4800, 9600, 14400, 19200, 38400, 56000, 57600, 76800, 115200, 128000, 153600, 256000
You can then read any of the possible combinations of fingers to see if those two fingers are touching:
Key.Enter = Pinch.RightThumbRightIndex
You can use any combination of the following fingers:
LeftThumb, LeftIndex, LeftMiddle, LeftRing, LeftPinky, RightThumb, RightIndex, RightMiddle, RightRing, RightPinky
If you want to use a combination of 3 fingers touching you must do it like this:
Key.Enter = Pinch.RightThumbRightIndex and Pinch.RightThumbRightMiddle
There have been reports that GlovePIE has the right and left hands backwards. I don’t know because I can’t test it. Can someone check and let me know?
If you have multiple sets of pinch gloves, or it is plugged into a strange COM port, you can specify a COM port like this:
Key.Enter = Pinch.Com1.RightThumbRightIndex
5DT Data Glove
The 5DT Data Glove is a cheaper, but not consumer-priced VR glove. It is more expensive than the Essential Reality P5 Glove, but in many ways it has less features. It has no tracker, and no buttons.
I don’t have a 5DT Data Glove, so this is untested.
You can detect whether the FiveDT glove exists with: FiveDT.Exists
The DG5 model has just the five fingers. You can read their raw values like this:
Or you can read their calibrated values like this:
FiveDT.Thumb, FiveDT.Index, FiveDT.Middle, FiveDT.Ring, and FiveDT.Pinky
To tell if it is a left-handed glove, you can read FiveDT.LeftHand, which is true or false.
You can tell which type of glove it is with FiveDT.Type, or FiveDT.TypeName.
The DG14 model has near (proximal) and far (medial) sensors for each finger. Although for the thumb it measures the medial and distal joints. The distal joints are the finger tips, which are only measured for the thumb.
You can read the calibrated values like this:
On the DG14, you can also read the gaps between the fingers:
There is also a wrist bend sensor:
Some gloves also have a rotation sensor:
You can read a number to identify a gesture like this:
You can also recognise gestures the GlovePIE way, by using a 5-letter code representing the 5 fingers: thumb, index, middle, ring, pinky
The letters can be:
x: don’t care
n: fully bent
r: partly bent
The gesture will be either true or false.
You can set FiveDT.minn and FiveDT.maxl (maxL) to specify the ranges that correspond to l and n.
If you want to calibrate the glove from GlovePIE, you can start calibration by setting
FiveDT.calibrating = true
And you can stop calibration by setting
FiveDT.calibrating = false
There is also a FiveDT.NewData value, but I don’t remember what it does.
Polhemus Fastrack and compatible trackers
You must set the Fastrack’s baud rate to 115200, otherwise it will not work with GlovePIE.
Other trackers may also be compatible, eg. The IsoTrak, Latus, or Patriot, or even some competing brands.
You can read the following values:
x, y, z: the position in inches by default
yaw, pitch, roll: the angles in degrees by default
exists: true if that sensor exists, false if it doesn’t
I can’t guarantee that the coordinates will be in the conventional GlovePIE coordinate system.
To read multiple sensors, use Fastrak1, Fastrak2, Fastrak3 and Fastrak4. eg.
debug = Fastrak2.x
You can also read from different COM ports, and have more than one tracker system connected, like this:
Debug = Fastrak1.Com2.x + “, “ + Fastrak1.Com1.x
Ascension Flock of Birds
You can read from the Ascension Flock of Birds tracker almost exactly the same as the Polhemus tracker above, except you use Bird instead of Fastrak.
It must be set to 115200 baud.
You can read:
Bird1.x, Bird1,y, Bird1.z: position in inches
Bird1.yaw, Bird1.pitch, Bird1.roll: angles in degrees
You can change the 1 to other numbers to read multiple birds.
You can also choose which com port to use if the default isn’t working:
Debug = Bird1.com2.x
You can read InterSense trackers like this:
InterSense.Pos1, InterSense.Pos2, InterSense.Pos3: x, y, and z coordinates. I don’t know which axes the correspond to though, which is why they have the strange names.
InterSense.Angle1, InterSense.Angle2, InterSense.Angle3: some euler angles. I don’t know which are yaw, pitch, and roll.
InterSense.Button1 to InterSense.Button8: If you are using a tracked Wand with buttons on it, these will be the buttons. They are either true or false.
InterSense.JoyX and InterSense.JoyY are the joystick on the Wand.
InterSense.AuxInput1 to AuxInput4: Additional inputs. These are returned as a 1-byte number
InterSense.Analog3 to InterSense.Analog10: Additional analog inputs. Analog1 and Analog2 are the same as JoyX and JoyY.
InterSense.Exists: True if it exists, false if it doesn’t.
You can use multiple trackers by adding a number after InterSense, eg. InterSense2.JoyX
The WorldViz Precision Position Tracker is an optical tracking system.
It has the following properties:
x, y, z,
quat1, quat2, quat3, quat4,
XVelocity, YVelocity, ZVelocity,
HasPosition, HasOrientation, HasGoodPosition, HasGoodOrientation
You can track multiple targets with ppt1, ppt2, ppt3, etc.
You can also optionally specify the com port if you want, like this:
Debug = ppt1.com2.x
The orientations are in quat1, quat2, quat3, and quat4. But it is a quaternion. Sorry.