Really need help with using MPU-9250 as a head tracker please

So I have a few days to finish what I've been stuck on for a long time on. I need to make a head tracker and use 2 servos (pan/tilt) to point to where the user is looking. I have the pitch for my tilt working perfectly, however I am really struggling to get an accurate yaw. The yaw value is to be used for the pan servo to imitate the 'left/right' movement of the head.

This is my current code - 9250-code/_9250_code.ino at master · 1994james/9250-code · GitHub

Any help will be appreciated, i just need to get past this to finish the rest of the project. also if there are another ways of doing it up open to ideas. Thank you.

Hi,

Can you please post a copy of your sketch, using code tags?
Please use code tags.. See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

It makes it so much easier to read without having to do a full download.

Thanks.. Tom.. :slight_smile:

Hi, it's too many characters to post on here. The code link I posted shouldn't need downloading

At least wrap URL tags around the link so that it is clickable.

MorganS:
At least wrap URL tags around the link so that it is clickable.

Yeah sure, I'll do it now. Sorry about that.