Dec 2020
Made with Unity and Arduino

In high school, my friend and I took on a fairly lengthy project to make a VR controller out of a glove and a lot of wires.

A demonstration of the final product.

We used a breadboard and Arduino attached to a sleeve to wire everything up, and hacked together some sensors to get everything working. For the fingers, we glued rubber bands attached to limit switches to each finger, and for the hand we used an MPU6050 sensor, which gave us both translational and rotational accelerations.

On the Arduino side, we used the i2cdev MPU6050 library by Jeff Rowberg to read in the data from the sensor. Then for the Unity side, we started with an XR Unity controller project by C-Through as the baseline for the hand model and controls.

To build the interface between Arduino and Unity, I made a message protocol which encoded some data about the hand. The Arduino would send this data to the serial port, and on the Unity side, I could then read in the data and turn it into movements on the hand.

The process wasn’t fool proof. Since the sensor only gave acceleration read outs, we could often get accumulated error in our measurements, since we were integrating over time to approximate the velocity, position, and rotation. Another issue was that the sensor was weirdly volatile and at times unreliable, especially during sudden movements.

An instance of the sensor freaking out.

Still a very fun project to work on despite the bugs. It would be nice to make a higher quality build in the future, and work out some of the kinks we encountered.