Page 1 of 1

(yet another) VR gloves thread: software ignorance edition

Posted: Sat Jan 25, 2014 8:01 pm
by Haloar
Made a DIY glove with a few strain gauges over some glove joints, hooked up to Arduino...

Now the hard part (or easy I don't know) -getting all the voltage values into game/ character movements.

I need to collect the values and put them into a hand model, any suggestions?

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Sat Jan 25, 2014 8:57 pm
by MSat
What engine are you planning on using?

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Sun Jan 26, 2014 11:20 am
by Haloar
MSat wrote:What engine are you planning on using?
I guess Unity for ease of use, where a number of COM ports are established and the data is fed to a hand model in a scene or something like that.

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Mon Jan 27, 2014 1:54 am
by MSat
You might want to ask around on the Unity forums then and see if such a thing is possible with the version you're using. Though off the top of my head, one option may be to emulate a gamepad where each finger corresponds to some analog stick access.

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Mon Jan 27, 2014 1:58 am
by cybereality
I believe you can read the serial port using Unity.

Here is some code I found with a quick search (not tested):
http://forum.arduino.cc/index.php/topic,40001.0.html

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Mon Jan 27, 2014 11:04 am
by Haloar
Thanks, I might have a go in glovePIE or freePIE too when I get a chance.

Unity is for manipulating a hand model, while the PIE's I'll use to compare voltage values to saved values and if they match perform a keystroke emulation.
It could even be used as a pointing finger controlling the cursor :geek: oh the possibilities

Re: (yet another) VR gloves thread: software ignorance editi

Posted: Tue Jan 28, 2014 12:06 pm
by Caliber Mengsk
@CyberReality
:D I haven't seen that code in a long time (**Note the username on the post). Now my code is threaded and closes the port when the game stops. Breaks a lot less often now. (in fact, even if things get unplugged while running, it doesn't break unity at least.)

@Haloar
You can do anything (literally anything) that c# mono can do, this includes socket communications (which includes talking to the arduino via serial), as long as you enable the full framework instead of the subset. (it's in the player settings)

Currently, that's how I'm talking to my arduino for my glove. Someone also made a script for interacting with the arduino from unity in a very simple way. https://www.assetstore.unity3d.com/#/content/6804

It's called uniduino. I haven't messed with it personally as the $30 price tag is more then I want to spend to save a few minutes of programming, but for those that aren't very knowledgeable in programming, sockets, and the like, it's probably better to use.