Software

NOTE: A User Guide that covers the flashing, calibrating and using of your device with minimal fuss is available within the Documentation section of the downloads page. Please ensure you choose the correct guide for your device.

Once you've constructed the bare hardware, you'll need to program the device. As-delivered, the Arduino Micro development board is "blank", with no code in it short of a generic program called a bootloader, which is used to get your own personal programs into the device via the USB socket. You take the open-source EDTracker code, you compile it (using freely-available Arduino development software) and then upload the compiled code into the Arduino device. This then turns the device into something functional - the code constantly measures readings from the MPU accelerometer/gyroscope module, turning those into values that make sense to your PC. It then pretends to be a PC Joystick, and sends those values to your PC as the X, Y and Z axes of an apparent 3-axis joystick. Your PC doesn't know any different, so you can make use of the head tracker in anything that accepts a joystick as the input.

If you prefer video guides, the following tutorial walks you through each step in setting up and programming an EDTracker, including software installation, setup and calibration.

The above process is the simplest way to get up and running with minimal fuss and no need to look at source code or compile anything. However, if you want to program your Arduino the old fashioned way (via the Arduino development environment), then read on...!

Arduino Drivers

If the board that you have looks like this...

Arduino Pro Micro from Hobby Components

... then it's a SparkFun Pro Micro, or an equivalent compatible design from another vendor like some no-name Chinese ebay outfit. The Pro Micro is not an official Arduino product, however it is effectively an Arduino Leonardo compatible device with a few less pins. SparkFun made the original design. For the purposes of programming, you can often consider it as an Arduino Leonardo if you don't have specific drivers from your manufacturer.  The drivers that are included with the Arduino IDE should work with it - give them a try. They are in a folder called "drivers" underneath your IDE install directory. This could vary from PC to PC, but is typically C:\Program Files (x86)\arduino-1.5.6-r2 (or similar).

To make things a little easier, we have packaged up the Arduino drivers for download.

When you plug your device in to a USB port, windows will attempt to find drivers, but will probably complain that it can't. Point it at the drivers folder above, and you should be sorted. If this doesn't work, chances are your board is a clone and isn't being recognised as fully compatible. There are two options here

  • Flash the genuine Arduino Leonardo boot loader ("Caterina") into it
    • This is not trivial and requires an ISP programmer, so we won't cover that here
  • Download dedicated drivers for your device from the vendor
    • Try the website of where you purchased it from
  • You're device isn't a Pro Micro
    • Does it have a USB plug on it?
    • Does it look like the above?
    • Does the main chip on the board have "MEGA32U4" written on it underneath the Atmel logo?
    • If any of the answers above are "NO", chances are you don't have the right type of Arduino development board.

Full instructions for installing the drivers for the Arduino Leonardo are on the Arduino website. Remember, technically your board isn't a Leonardo, but it is Leonardo-compatible (with the exception of a few missing pins, which make no difference from an EDTracker perspective).

Arduino Development IDE

NOTE: If you have no desire or intention to muck around with the C code that EDTracker uses, and you just want to get a device up and running with the minimum fuss, then stop here and jump to the instructions for flashing your device with the Update Tool. The following instructions are for those who wish to understand a little more of how EDTracker works, and 'tweak' the code.

The Interactive Development Environment (IDE) for the Arduino development boards is completely free to use and is available from http://arduino.cc/en/Main/Software. Go ahead and download it. While you can technically use either the stable or beta releases, to keep things simple we've standardised on the beta version for the instructions. The stable release makes smaller code, but the beta release has better features, product support and signed drivers for Windows 8 users. If you must use the stable release for any reason, just bear in mind some of the folder paths are different, and you'll need to customise your device files (in particular, USBAPI.h is different - read the instructions on Pocketmoon's GitHub carefully).

Download the IDE and install it. Run it up once and then close it - this might sound odd, but it creates some default directories which we'll need further down.

Custom Device

To make the process simpler, you can install a 'custom' device into your Arduino IDE. It is basically the same default files at the Leonardo/Micro, but with the libraries and modified USBAPI.h and HID.cpp files included. This saves you altering any of the cores files in your Arduino IDE install - when working on the EDTracker, choose the appropriate device from the Tools --> Board menu.

The custom device files are on GitHub.

Source Code

Now it's time to download the source code - the program instructions - for the EDTracker device. The program is written in C, which is the standard programming language used in the Arduino IDE. It is not the intention of these instructions to cover how to write C code, so if you're interested in learning, the Arduino website has plenty of content on how to get started in microcontroller programming. Likewise, Google will turn up tonnes of information. All we're going to cover here is downloading the source code, flashing it into your EDTracker, and verifying it works ok. If you want to tweak the code, that's fine, but short of some community support and spirit you should consider yourself "on your own" if you go that route!

Head over to our GitHub repository (tip: the latest source code is linked from the main menu above). Follow the instructions in the main README text.

Click the "Download ZIP" button on the right-hand side of the website to download all of the source files in a convenient ZIP file. Save it on your PC, then open it and unpack the folders into the following locations, according to whichever version you downloaded.