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

Picture of 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?
roychook5 years ago
is there any code example for the arduino and how do u get angle information from the accelerometers
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."