Shiny Quagsire (Max Thomas) chose an extremely ambitious project for his high school final project: rather than creating something using the many VR hardware solutions out there, he decided to create his own VR controllers from the ground up.
The eventual solution utilized a Teensy 3.2 with TDK MPU-9250 nine-axis gyro/accelerometer/compass sensors, in a PlayStation Move-like form factor, but using infrared.
The initial attempt used pure IMU data, which proved infeasible due to poor sample rates and accuracy. Switching to a camera and LEDs whose position could be triangulated improved things, but what proved superior to this was diffusing IR LEDs via styrofoam spheres and using the resultant 2d circle to determine X/Y position, and its size to approximate Z. The entire journey can be relived in detail on Shiny Quagsire’s Tumblr, and the source code and STLs can be found on GitHub.