View Full Version : [Question(s)] getting phidgets data to read as a joystick

01-15-2011, 09:59 PM
Basically I'm an artist who has been working in 3D graphics for the last 6 years. I have a great idea to use data from phidgets sensors as controllers for my animation. the problem is as far as I can tell I need each phidgets sensor to read as it's own virtual joystick. So I basically need for someone to be kind enough to point me in the right direction as far as getting phidgets sensor data to read as a virtual joystick.

01-15-2011, 10:45 PM
Im not sure that I can be of help, but...what software are you using? You mit not be able to get the phidgets to show up as a joystick, but depending I might be able to make it into either a MIDI signal, or UDP. basically you need to know wht protocal you are trying to use, and get something that converts to that protocal. So if your software can listen to either midi or UDP I would be happy to help.


01-16-2011, 01:45 AM
One question- why do you need this specifically as joystick data? Are you just using joystick as an analogy? If so, couldn't you just convert the sensor values to the appropriate ranges for your project? Phidgets have libraries and support for a ton of languages and there should be an appropriate function in there somewhere for what you are trying to do. Check out their website under the tab "Programming" and you'll find a ton of sample apps, libraries and documentation on your specific piece of hardware.

However if you do need to do this from scratch and have your system treat the Phidget as a joystick and the platform for your project is a PC running a Windows OS...

.... You might try looking into DirectX's DirectInput. It can (with a little stretching) handle almost any input device. In the past I've used a USB analog reader and 6 generic potentiometers to make a custom joystick with 6 different axis. I decided to give DirectX programming a try to attempt to interface with this frankenstein of a joystick I had made. After getting my head around the SDK's documentation and working through the samples it was a breeze to work with. Google "download DirectX sdk" for more information on where to get it.

In general I'm Linux/Windows neutral but I have to admit I had a great experience with DirectX's DirectInput. Just a thought =)

01-16-2011, 11:19 AM
ok I have a project that i have been trying to work on. I am a 3D artist and I have been trying to create a new system for facial motion capture. I have various models ready and rigged. i basically have it set to be animated.

3D studio max either allows you to move your control points by the mouse and record them, or you can use external controllers. such as midi devices, joysticks or the keyboard. I'm able to apply the motion capture device to my controllers and move them by joystick OK on my own right now. I would like to use phidget devices to track the various parts of the face such as nose lips, bros and head movement and apply that to my control points on my cgi model.

so midi would be the perfect option but to be honest that is above my level f programming skill. as i am a beginner in programming.

01-16-2011, 11:47 AM
Im assuming you have a phidget 8//8/8? If not let me know. i think I can whip something out tonight and post it for you. Sounds like a cool project. If its some oer phidget let me know so I can change things up.

Also, mac or PC?

01-16-2011, 12:01 PM
OK darkback I would greatly appreciate any help I have lots of screenshots and info on the project and would love all help you could give me. also I will be buying more phidget equipment late on this month so I can post the complete idea for the system as well. I need to transfer over to a different computer.

01-16-2011, 02:59 PM
BASICLY THIS IS A QUICK OVERVIEW OF WHAT I HAVE BEEN TRYING TO CREATE. I want to create a one source motion capture system. basically use phidget seonsors to track rotation of human joints from an actor and apply them to a virtual model in 3d studio max. here is a few screen-shots of the model i create recently for a demo.

as of right now she has all control points in place and I can control them via a joystick or just use the mouse. but My ultimate goal is to be able to use phidget sensors to track data from an actor. Getting the rest of the info including drawings together and posted tonight.





01-16-2011, 03:09 PM
I'll get a diagram of the control points i create and the setup I'm still working on after diner.

01-16-2011, 03:56 PM
Very cool :) Reminds me like puppetry in animatronics; I have a similar rig for one of our biped robots (using N number of joysticks/analog inputs to control joint rotation or animation speed) but only using standard hacked up cheap joysticks.

Anyway... A few notes about getting Joysticks to detect as "Windows game controllers"

DirectInput only supports 8 analog axes per device (128 buttons, full range POV hat as well) but no limit on "Number of joysticks you can plug in"

XInput supports only 4 axes, 10 buttons, 2 triggers and 8-way POV and you are locked to only 4 simultaneous devices per computer.

If you are looking to have say 24 analog control sticks you're in for some trouble but I have seen a working One-USB-Connection joystick clone itself out and install as 4 unique game controllers by use of tricky drivers.

One last note...
If it proves to be too difficult to get a phidgets board to detect as a windows joystick there is a program/library called PPJoy (Parallel port joystick) that allows you to inject just about any data you want and have it detect as a virtual windows joystick. I've used it with everything from PS3 controllers to old school Atari controllers that I was too lazy to write drivers for.

01-16-2011, 07:18 PM
OK after talking it over and looking it up online my best option would be to have the entire set up read as a midi file. so basicly I am going to use a phidget board 8/8/8 and connect various senors to it. and have them all transfer to midi as the program I am using 3D studio max can accept midi. Still lots of work left to do but this is the closet I have come yet.

01-17-2011, 05:48 PM
small diagrams of what I am planning. i will be adding more control points to the face after i get these ones to work.