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.