OSVR-firmata is an OSVR plugin intended to make it easier to build OSVR compatible gamepads and motion controller using Arduino or Sparks boards. By default the plugin provides access to the digital and analog inputs of the board as button and analog interfaces in OSVR, with no need to write any code. Or you can fork the plugin and add code to perform calculations on the input, send output, request data from I2C or serial devices like accelerometers – this still only requires code to be written for the PC. The microcontroller always uses the StandardFirmata firmware.
Click here for a tutorial on how to build an OSVR compatible joystick using OSVR-firmata.