Raw Vive HID/USB parser
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deps
libvive
vivegui
.gitignore
LICENSE
Makefile
NOTES.txt
README.md
package.json
vivehid.c

README.md

libvive

vivegui

libvive is a library for reading USB data from:

  • VIVE controllers

    • Buttons
    • Gyros
    • Lasers
  • VIVE headset

    • Lasers
    • Gyros?
    • Camera
  • Lighthouse

    • ???

Installation

Dependencies libvive: hidapi

Dependencies vivegui: glfw3, GLU, GLEW

$ make install

Example

int main(int argc, char** argv) {
  struct vive_state vive;
  struct vive_controller *controller;
  int i;

  if (vive_open(&vive)) {
    printf("Could not read from vive controllers\n");
    return 1;
  }

  for (i = 0; i < vive->num_controllers; ++i) {
    controller = &vive->controllers[i];

    printf("smoothed gyro pitch/roll: %f %f\n", 
           controller->pitch_smooth,
           controller->roll_smooth);
  }

  vive_close(&vive);