Need guiadance with DIY Headtracker made with Arduino and an accelerometer

Hello everyone. First of all, it's my first project and my first "question" here so it's probably that I will make mistakes because I'm an autodidact in this theme.

I'm trying to make a headtracker using an ADXL362 accelerometer with it's respective library (ADXL362 by annem) and an Arduino UNO. I can see the X, Y, Z coordinates througt the Serial Port using the Simple Read example of the library but I don't know the following things:

  • Which software to use.
  • How can I pass the information to that software.

I have tested with programs like FreePie, FaceTrackNoIr with Hatire Arduino plugin ( but I couldn't find any software to do what I'm expecting to do: Control some video games with the accelerometer.

Any help or suggestion will be helpful. Thank you.

Define what you mean by a headtracker (an accelerometer cannot be used to measure rotational movements).

Well, a head tracker is a device that should capture my head rotations and, in combination with software, should rotate the camera, the character head, etc.

In the other hand, if I musnĀ“t use an accelerometer, what do I need???

He needs a machine gun targeting system for his RV. (Preferably with HUD display and night vision)

You need an AHRS, which will tell you the orientation of your head. An ANRS usually has a magnetic compass, gyro and accelerometer. Read about them here, especially the one on Fundamentals of Attitude Estimation.

Ok, I will investigate more about the AHRS.

And about the machinegun targeting system, what should I do with it??

  • Is easy to use?
  • Is cheap?
  • Where can I find it?

Remember that I'm trying to do an Do It Yourself proyect, so it must be cheap, well, you understand me...

Thank you for all the information!!!

And about the machinegun targeting system, what should I do with it??

It was an APPLICATION example , presented to answer the question "What are you trying to do ?"
The Apache hellicopter has a gun turrent head tracking system. Anyone who has seen it , knows what I am
talking about. The fact that you want to use it for a camera is irrelevant. It's still a headtracker and still
works the same way (though not as good) as the one on the Apache.