C# Arduino Headtracking MPU6050

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: C# Arduino Headtracking MPU6050

by Anonymous » 19 May 2025, 00:47

Ich arbeite an einer Anwendung, die Menschen mit Behinderungen helfen kann, den Computer zu verwenden. Die Anwendung liest Werte aus Arduino+MPU6050 (die über dem Kopf positioniert ist) und konvertiert sie in Position. Die Werte aus seriellen Ports sind wie "x, y", und die Skala dieser Werte verläuft von -16000 bis +16000. Alles funktioniert gut, aber ich habe ein Problem. Wenn die Person, die diese Software/Hardware verwendet, über eine Art Muskelspamm oder Tics verfügt, ist die Software zu präzise und bewegt die Maus. Ich möchte diese chronische Bewegung beseitigen ... wie kann ich das tun?

Code: Select all

public void computePosition()
{
data = connection.readSeriaLine();
words = data.Split(',');
yaw = words[0];
pitch = words[1];
Int32.TryParse(pitch, out posiY);
Int32.TryParse(yaw, out posiX);
posiX = posiX / headSensitivity;
posiX = posiX - globalPosiX;
posiY = posiY / headSensitivity;
posiY = posiY - globalPosiY;
int signX = Math.Sign(posiX);
int signY = Math.Sign(posiY);
int positionX = Cursor.Position.X;
int positionY = Cursor.Position.Y;
Cursor.Position = new Point(positionX + (signX * movementSensitivity), positionY + (signY * movementSensitivity));
}
Vielen Dank

Top