DIY Head Tracker For A Tenner

Building on that info, I have a batch file containing the following command:

Code:
echo R > COM4

the trouble then being that the DOS window flashes on top of the ED screen when the file is invoked; a solution is to call the batch file from a vbs file:

Code:
CreateObject("Wscript.Shell").Run "d:\bin\EDTrackerReset.bat", 0, True

then I use GlovePIE to invoke the vbs file from a joystick button:

Code:
if (pressed(Joystick1.Button3)) {
    execute("d:\bin\EDTrackerReset.vbs")
}

Can you set a hotkey on a shortcut to the .bat script and set it to run minimized, perhaps put '@echo off' as the first line in the script if needed?
 
Can you set a hotkey on a shortcut to the .bat script and set it to run minimized, perhaps put '@echo off' as the first line in the script if needed?

Yes -- contrary to what I thought, running minimised does work ... I'd left the shortcut with the same name (minus the .bat) and in the same directory, and GlovePIE was evidently running the batch file, which made it seem not to work. Giving it a completely distinct name fixed the problem. So, no need for the vbs wrapper.

I can't get shortcut hotkeys to work at all though, but I reckon they probably will for others!
 
Yes -- contrary to what I thought, running minimised does work ... I'd left the shortcut with the same name (minus the .bat) and in the same directory, and GlovePIE was evidently running the batch file, which made it seem not to work. Giving it a completely distinct name fixed the problem. So, no need for the vbs wrapper.

I can't get shortcut hotkeys to work at all though, but I reckon they probably will for others!

Shortcuts need to be either in the Program Files directory or the Desktop (or in a directory on the desktop) and then you should be able to set a hotkey. Use 'Send To -> desktop' and then set the properties on the shortcut.
 
Shortcuts need to be either in the Program Files directory or the Desktop (or in a directory on the desktop) and then you should be able to set a hotkey. Use 'Send To -> desktop' and then set the properties on the shortcut.

Ah right, thanks ... wasn't aware of that (you can tell I don't use shortcuts much!).

But since I use GlovePIE to provide an extra layer between my joystick and the game, it's no overhead for me to do it that way. With EDtracker I can now detect when I'm looking at a panel:

Code:
// get EDtracker state

var.hX = Joystick2.x
var.hY = Joystick2.y
var.hZ = Joystick2.z

if (((var.hX < -0.35) || (var.hX > 0.35)) && var.hY < 0.15) {
   // looking toward one of the panels
   var.panel = true
} else {
   var.panel = false
}

and then have the script do different actions/mappings later. In principle I could also use the z axis to send keystrokes ... prev/next weapon, perhaps.
 
Last edited:
Those beautiful, beautiful people at Frontier have put the Arduino USB PID's into the release so the EDTracker device is now recognised as a controler and seems to remember configuration across restarts/crashes without any issues now, particularly if mixed with other "unknown" devices.

Thankyou FD! Like I said, I'm a chuffing great chuffed thing on the 9:15 to chuffedsville :)
 
  • Like (+1)
Reactions: Rog
Those beautiful, beautiful people at Frontier have put the Arduino USB PID's into the release so the EDTracker device is now recognised as a controler and seems to remember configuration across restarts/crashes without any issues now, particularly if mixed with other "unknown" devices.

Thankyou FD! Like I said, I'm a chuffing great chuffed thing on the 9:15 to chuffedsville :)

Excellent news, mate!
 
Those beautiful, beautiful people at Frontier have put the Arduino USB PID's into the release so the EDTracker device is now recognised as a controler and seems to remember configuration across restarts/crashes without any issues now, particularly if mixed with other "unknown" devices.

Thankyou FD! Like I said, I'm a chuffing great chuffed thing on the 9:15 to chuffedsville :)

Brilliant news guys!

Now if I could only just get mine to work with the new Ed Tracker Config - Calib utility. At least I haven't got a blank white window anymore after installing Java 32bit. I turned on verbose and I see it is complaining about USBAPI.h but I've copied the correct files into the correct directory.
Pulling out what little hair I do have left.

Error dump as follows:
Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Micro"
Using library Wire in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire (legacy)
Using library I2Cdev in folder: C:\Program Files (x86)\Arduino\libraries\I2Cdev (legacy)
Using library EEPROM in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM (legacy)
Using library InvensenseMotionDriver in folder: C:\Users\David\Documents\Arduino\libraries\InvensenseMotionDriver (legacy)


C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 -DUSB_MANUFACTURER= -DUSB_PRODUCT="Arduino Micro" -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\micro -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Program Files (x86)\Arduino\libraries\I2Cdev -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM -IC:\Users\David\Documents\Arduino\libraries\InvensenseMotionDriver C:\Users\David\AppData\Local\Temp\build6017557271603654169.tmp\EDTrackerIICalibrate.cpp -o C:\Users\David\AppData\Local\Temp\build6017557271603654169.tmp\EDTrackerIICalibrate.cpp.o

In file included from EDTrackerIICalibrate.ino:5:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:222:20: error: USBAPI.h: No such file or directory
EDTrackerIICalibrate.ino: In function 'void setup()':
EDTrackerIICalibrate.ino:116: error: 'Serial' was not declared in this scope
EDTrackerIICalibrate.ino: In function 'void loop()':
EDTrackerIICalibrate.ino:180: error: 'Serial' was not declared in this scope
EDTrackerIICalibrate.ino: In function 'void parseInput()':
EDTrackerIICalibrate.ino:190: error: 'Serial' was not declared in this scope
EDTrackerIICalibrate.ino: In function 'void update_bias()':
EDTrackerIICalibrate.ino:286: error: 'Serial' was not declared in this scope
EDTrackerIICalibrate.ino: In function 'void tripple(short int*)':
EDTrackerIICalibrate.ino:340: error: 'Serial' was not declared in this scope
EDTrackerIICalibrate.ino: In function 'void mess(char*, long int*)':
EDTrackerIICalibrate.ino:347: error: 'Serial' was not declared in this scope
 
In file included from EDTrackerIICalibrate.ino:5:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:222:20: error: USBAPI.h: No such file or directory

Hi,

Did you rename USBAPI.h to take off the version number e.g.

Rename USBAPI.h.156 to USBAPI.h

or

Rename USBAPI.h.105 to USBAPI.h

?
 
Did you rename USBAPI.h to take off the version number e.g.

Yes, done that. Followed the instructions to the letter.

I sort of had the unit working with the original method and just thought I'd give this newer method a go.
How do I wipe the Arduino and start from scratch ? Is it even possible ?

Calling it a night but thanks again guys for such a brilliant little project :)
 
I hate it when the virtual store raises it's ugly head when you overwrite files in system controlled directories as a normal user. You can check by looking under the following path for duplicate files.

C:\Users\<user>\AppData\Local\VirtualStore\
 
Those beautiful, beautiful people at Frontier have put the Arduino USB PID's into the release so the EDTracker device is now recognised as a controler and seems to remember configuration across restarts/crashes without any issues now, particularly if mixed with other "unknown" devices.

Thankyou FD! Like I said, I'm a chuffing great chuffed thing on the 9:15 to chuffedsville :)
This is *very* good, so a sincere thank-you FD/Mr Brookes. :)

(If you could still sneak in some way to access lean forward/back axes like Oculus Rift, that would be stupendously ticketty-boo also. We won't tell anyone). ;)

BTW, do the new libraries help with accuracy after vigorous movement? I'm very nearly at the stage where I've got it calibrated so that it doesn't waver (at all) after many hours if stationary. I'm largely using the original instructions/sketch.

Also interesting to see that http://edtracker.org.uk/ is starting to take shape...
 
*snip*

(x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:222:20: error: USBAPI.h: No such file or directory
EDTrackerIICalibrate.ino: In function 'void setup()':
EDTrackerIICalibrate.ino:116: error: 'Serial' was not declared in this scope

etc...

*snip*

Did you sort this one out, Frodo?

I'm seeing the same problem after installing 32-bit Java and moving to the EDtracker 2 software.

The updated sketches and UI were working fine while I had the HDI.cpp and USBAPI.h from the original version. I replaced them with the newer ones USBAPI.h renamed correctly) from version 2 and then started seeing the same errors.

"C:\Users\<user>\AppData\Local\VirtualStore\" isn't there on my machine.
 
Last edited:
I'm seeing the same problem after installing 32-bit Java and moving to the EDtracker 2 software.

I'm probably quoting this out of context, but as I have an interest in the 'cheap' head tracker (seeing as I'm not well off enough for the 'full price' one), I need to ask:

Does the use of this DIY tracker require Java?
 
So Java is required in order to calibrate? OK, thanks. That's a shame for me. To explain why would be going off-topic so I'll leave it at that.
 
Just ordered another headtracker and got a 9150 on the slow boat from china, so I will be ready when you clever people figure out how to make use of the other sensor :)
 
Back
Top Bottom