Skip to content
A simple single-file python library and example program to get data from a TrackIR camera
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add screenshot and improve README Dec 31, 2019 Add screenshot and improve README Dec 31, 2019
trackir_screenshot.png Add screenshot and improve README Dec 31, 2019

This is a windows-only program and library to read the 6 DOF (six degrees of freedom: x,y,z,roll,pitch,yaw) data from a TrackIR camera.

Screenshot of example console program running

To use, buy a TrackIR device, and run the TrackIR software, and make sure that it's working there. If you want raw data, make sure you set the profile to "one:one" and set the smoothing to 0.

Then run the program, and see the data printed out at approximately 100hz.

Running python 3 in Windows

To run, you can use run it within visual studio code, or from a git bash command line like:

winpty python3.exe ./

(It might ask you to install python3 first)

Or log to a file like:

winpty python3.exe ./ > log.csv

Using the library

To use the library it is as simple as:

    import tkinter
    import time
    from trackir import TrackIRDLL

    trackrIr = TrackIRDLL(tkinter.Tk().wm_frame())
    while True:
        data = trackrIr.NP_GetData()

Please see for more details.

You can’t perform that action at this time.