Step 19: Write Some Games to Use Your New and Improved Power Glove!

That's it! You now have a Power Glove that sends accelerometer orientation, bend values for 4 fingers, and a bitmask for pressed buttons via Bluetooth. Since you have a serial port set up, you can read these in with any language that has serial access. Remember that to start receiving data, you have to send the string A first.

For making games, I'd seriously recommend Unity3D. If it weren't for this one tool and how slick and easy it makes the process, I wouldn't be making games professionally or as a hobby right now.

In the downloads I linked in the intro, I've included a Java program that reads the serial data and spits it out as a text file. This way, if you tech doesn't support serial I/O but can read a text file, you can do that instead.

I've also included two sample Unity3D scripts (written in Unity Javascript, an ActionScript-alike) that are the input manager I use for the Power Glove. They show a simple way to use the raw data to get more human-usable information.

Next step: Off-Road Velociraptor Safari with the Power Glove?
How possible would it be to mod one for general computer use? As a user of Photoshop and Lightroom (likely more to come), I'd like the ability to map its controls. With no experience in programming, I may have to lean on some friends of mine.
<p>I'm curious as to what resistance ratings you got from your flex sensors. I am doing a similar project and am having trouble determining what resistor to use for each flex sensor.</p>
Would this be a hard program for someone with no background in programming?
The most difficult part of the programming was probably understanding the data stream itself &ndash; how the sensor information is packed into a few bytes and transmitted, and then how the host computer unpacks those bytes and translates them back into useful values. If you've done other arduino programming, those parts will be advanced but not impossible to understand, and I've provided source code so you can use it as a reference. <br><br>But there's also the question of what you do with the sensor information once you decide the data on the computer. This version of the glove doesn't work just like a normal joystick. So you'd either need to write a joystick driver (definitely not easy) or just hard-wire it into something you are already making (which is what I did). That part will definitely be hard without programming background.
Is there any way I can tap into the finger data from the glove without butchering it? I'd like to use the glove as an Arduino input but still and be able to play PunchOut when I want to.
You could certainly make (or buy) a converter dongle to translate the NES datastream to USB (for example, USB NES RetroPort here http://www.retrousb.com/index.php?cPath=21&amp;osCsid=9f97f8759941ee5256ea3e83d1b88da8). <br>The only hard part would be decoding the proprietary datastream that the Power Glove is sending over the wire. It's a complex peripheral with many sensors. As I understand it, it sends 12-byte packets with the format: <br>1: A0 [header byte] <br>2: X position <br>3: Y position <br>4: Z position <br>5: Rotation <br>6: Finger status <br>7: Button status <br>8: 00 [End data stream byte] <br>9-12: 00 3F FF FF [Unsure? Timing?] <br> <br>I do not know how individual buttons/fingers are masked in bytes 6 and 7, but this info is probably buried in a forum somewhere, or you could pretty easily figure out, by printing the byte as a bitmask and looking at how it changes as you press things or move the fingers. FYI, I got the info about the datastream structure from these two sources: <br>http://arstechnica.com/civis/viewtopic.php?f=11&amp;t=689680 <br>https://github.com/OpenEmu/Nestopia-Core/blob/master/core/input/NstInpPowerGlove.cpp
Or even, since you want to use it with Arduino, just break out the NES port leads into the Arduino inputs.
I love the power glove-avgn
a wise man once said:<br>I love the power glove! it is SO BAD.
brillinat rather than a standard gaming controller could this be used as a mouse in a minority report sort of way
Dude that was really awesome. You must have the coolest job. BTW Flashbang and specifically Blurst rocks. Love what you guys are doing in Unity.
Could you program it so Windows could read it as a standard game controller?<br />
&nbsp;Absolutely -- while I have no idea of the details (haven't done Windows OS-specific programming in ~4 years), it should be as simple as writing a serial-joystick driver that decodes the bluetooth serial stream and translates it into joystick axes/buttons.
It would be great if you did, since then it could be used with pre-exisiting games that are compatible with standard gaming controllers.<br />
That has got to be the most awesomest butchering of classic hardware I've ever seen! I DESPISE you for killing a working powerglove. i ADORE what you made from the carcass. I'm so conflicted. this sucks/is great! Keep up the good work!
i agree fully, he made it look like it isn't hacked up (too much), but then again, he destroyed a good PowerGlove.
Mine was for Sega. So I gutted the thing. I am still saying up for a wireless mouse to hook up to it. and I also have an NES zapper that I am going to attach a gyromouse to it to play in actual games.
&nbsp;or you could use a reproduction zapper, and not destroy an old one.
It isn't necessarily 'destroyed'; all you need is another microcontroller and bluetooth module, and you can build yourself an adapter to plug into your NES, giving you back all the 'joy' and 'wonder' of the original powerglove functionality, but wireless to boot!
is there any code example for the arduino and how do u get angle information from the accelerometers <br />
why why for the love of god hasen't Nintendo made a wii powerglove it would be the best selling peripheral yet
Well, they have, in a way. It is basically a pair of boxing gloves with sleeves on the back to hold the Wiimote and Nunchuck. Don't buy it. Just duct tape the controllers to real boxing gloves.
it's "duct" tape
actually it goes both ways. duct tape and duck tape. wow late reply, lol.
There is Duck brand duct tape. Duck tape is my duct tape of choice.
i prefer gorilla
the old power glove felt nasty so they need to think of a better version of the glove but it not be a good idea on the sweaty smelly side
use seat shirt material and attach the tech via Velcro and snaps you'd probably have to cannibalize a wiimote so you can make the buttons accessible
I should have read below me
Yeah, well, uh, just keep your Power Gloves off her, pal, huh? Kidding, great project, looking good sporting the 'glove.
super cool to the homeless?
but....it's so bad....
Holy cruddish you use Unity3D? Awesome! Have you joined the forums? and have I seen that boxing game????????? Post this on the Unity forums man, it's awesome!
Yeah I'm on the Unity forums. User biphenyl. We've been using Unity exclusively at Flashbang for a year and a half or so. The boxing game is Touch KO for the iPhone, developed by my brother Adam and I. It's not done yet, but we're shooting for a June release.
What the hell am I going to do with my R.O.B.?
I was musing that the other day. He certainly ranks up there among useless peripherals!
Certainly to get it to do anything you would need to get some better servos among other things. He'll have to be gutted considerably...
And you can solder multi-filament ones so that they stick in the protoboard better
i think it would be cool to mod a wiicontroler into one. it would be about the same except you could use it with the wii.
Anyone interested in game development but want more power then Unity3D provides, should also check out GarageGames.com, The license fee for there engine under independant devloper flag is only a couple houndred bucks, you get the source code and with a little work it rivals the unreal engine, plus the support forums are absolutly amazing!
Never trust someone who has to have their id called, "TheTrustedOne."
Wow, good job! The crazy thing is, I did this too! I've got my Arduino-wired Powerglove right here in a bin on the shelf next to my desk!<br/><br/>I've got pics of mine on my site: <a rel="nofollow" href="http://www.clydeshaffer.com/clydeshaffer/glove.htm">http://www.clydeshaffer.com/clydeshaffer/glove.htm</a><br/><br/>As for interfacing with games, check out PPJoy! I used it to feed the bend sensor data to the joystick axis through the serial data. My Arduino code sent each of the bend values as a single byte, in the protocol on the PPJoy site!<br/><br/>I haven't done much else with my Powerglove since, but when I install PPJoy and the Arduino stuff on my new laptop I'll play around with it some more now!<br/>
Very nice, Clyde! Using the bend data as joystick axes is a pretty slick idea, I might have to give that a look!
I didn't have an accelerometer handy, but it looks like a great idea! Currently I can only track the hand motion with a Wiimote strapped to my arm. I might also try placing the Wiimote over my monitor and putting an IR light on the glove...
I childishly and recklessly opened this part and the board fell out. When I couldn't get it back in I stuck in some balsa wood instead to keep the buttons from falling out.
Bluetooth! Snazzy. I used some spare speaker wire (the kind thats two wires stuck together) that was left over from installing my stereo.
Your approach is much cleaner, I ended up cutting the cables and connecting them right to my Arduino analog inputs. I had someone else wear the glove and flex their fingers while I probed the wires with a multimeter!

About This Instructable




Bio: I have a B.S. in Mathematics. I am currently working on a PhD in Astrophysics. I once made indie video games with Flashbang Studios ... More »
More by biphenyl:Power Glove 20th Anniversary EditionArticulated Bicycle Camera Mount With Quick-Release
Add instructable to: