Headtracker built with a Teensy 2.0 and an Adafruit 9-DOF IMU Breakout
Based on work from WebKris & Michael Baker
Then, add thoses library to IDE :
Load one of the following code :
View all 6 instructions
In order to follow projects & hackers or give likes
you need to create an account.
I have another use for the tracker, navigation gear for simulator program. The visual device is on a gimbal and view needs to change as you move the device. Very much the same, just not a "head tracker". My program requires the clicking of a button to activate the joystick. I see the Joystick.button Action from the sub joystick example, but being New to this... I am not sure where to insert it to avoid creating a proble. Are there digital pins to stay away from? Wher in the sketch should the button lines Be safely added?
We built one without buttons and as soon as we removed the screws in the case and pointed toward north, calibration was much More fluid. Once the Joystick has buttons we can test.
Thanks for any advice
Update - ok I took a couple stabs at it and now have the buttons added to the breadboard version. Hopefully will be able to add them to our prototype and test on Monday
Are you sure? yes | no
Hmm... I tried to upload to Git hub, but I'm not going to make changes to your existing.Grab code from here:http://planetkris.com/headtracker/
Ok, it is the original code from your blog (minus some changes on fscale parameters). I thought it was something else.
Exactly. Give Opentrack a shot!
I’ve added the configuration to the github project : https://github.com/paulgreg/headtracking-from-kris/blob/master/opentrack/elite.dangerous.ini (and I’ve added you as contributor too)
Hello @webkris ! Thanks a lot for those advice.
I’ll try to calibrate the breakout as you say then give a try to OpenTrack.
Just a question, when you say "I uploaded my code (for use with opentrack)", where did you upload it ? :-)
Okay - I had a lot more success tuning this when I dropped all the smoothing off of the Teensy - and moved to using https://github.com/opentrack/opentrackThis allowed me to set up my preferences in Opentrack while the game was running, and you basically leave the teensy to report 1:1 movement in space. I found this much more accurate. I uploaded my code (for use with opentrack) and the opentrack.ini to get you started.
"Just mapped the joystick 1:1.
Once your head tracker loads this code it will do all of the graphing and transformation on Opentrack. Or work like a REALLY SLOW joystick. :p
The Roll and Yaw axis are switched, and all of the inputs are inverted.Load the ini into Opentrack 2.2-stable /install/settings
Plug in tracker.Open the code with arduino and upload.Give it 10 seconds to reset.
Start Opentracker - load settings - hit start and try it out!Then you can get crazy with all your curves and filtering.
Open Elite - make sure to UNBIND the head look from the Joystick (original config).It'll be a totally blank config for "Headlook Mode" under elite.
Start a trainer and check it all out.You can tweak the settings while the game is running!"
Give it a shot!
Hello from PlanetKris :)Saw your comments about the headtracker and would be delighted to continue the conversation here. First off - let me start by saying - I only wish I wrote any of the code. This the the work of Michael Baker (the Pololu_Open_IMU using the Madgwick algorithm).
Originally I had tried to use the Adafruit library, but unfortunately, they took the calibration program out of their examples and code and their customer service was like "Techniques for solving the problem do exist, but they're proprietary and valuable to the companies that have them." - even small magnets are powerful to this device... blah blah bla: https://forums.adafruit.com/viewtopic.php?f=25&t=63672But the answer is this: Every single one of these chips needs to be calibrated to run with your program. I built 3 of these and ALL 3 needed manual direct calibration. So, how do we do that?Clear your desk off, connect your head tracker with a nice long USB, and load the Calibrate program from the LSM303 1.4.4 Library:Open Serial MonitorRotate your IMU slowly 360 degrees in the X, Y, and Z axis.I usually start flat on the table and rotate 360 - going slow about 10 seconds.Then without jarring (NO high G load) I slowly pick up the IMU and rotate Left to Right 360.Then Front to Back... You are trying to get the device to "see" magnetic north in every orientation.
You'll notice the MIN / MAX on the serial output will begin to settle out.Copy pasta those numbers to the top of the code:
#define compassXMin -###.0f#define compassYMin -###.0f#define compassZMin -###.0f#define compassXMax ###.0f#define compassYMax ###.0f#define compassZMax ###.0f
You're right, after a slow calibration process, results are much better ! I’ve updated steps to reflect that.
by Adam Vadala-Roth
by William Blankenship
by Sapdo Utomo
Become a member to follow this project and never miss any updates
© 2017 Hackaday
Yes, delete it
You are about to report the project "Elite Dangerous Headtracker", please tell us the reason.
Your application has been submitted.
Are you sure you want to remove yourself as a contributor for this project?
Project owner will be notified upon removal.