i downloaded your source and run with my wiimote motion plus, after i clicked "connect" and activate the gyro sensing by holding "B" button, the cursor will automatically move very fast to the left, no matter what orientation the wiimote is, the cursor will always move to the left and hit the bound? Is it because Im running the application under windows 7?
Sorry for late response, but I couldn’t reproduce your problem. I doubt whether it’s because of OS.
Probably, the property of your gyroscopic sensor is different from mine. In my source “Form1.cs”, line 132 through 160 are the process which translate gyro values to mouse motion. There are GYRO NEUTRAL values for x, y, z axis. I think it’s because these constant values are inappropriate for your motion plus.
In order to reconfigure, put your motion plus into static position and see the stable gyro values (ex. “Console.WriteLine(ws.MotionPlusState.RawValues.X);”), then rewrite GYRO NEUTRAL values into that values.
Thank you very much for your advice. After that problem, i decided to try with my other motion plus (since i have three of them), and it works out well on my 3rd black motion plus i bought from HK. Based on this condition and you explanation, i can conclude that, it just a matter of the constant biasing value. And i can also see that in your C# code, you are using constant value to take the offset off the raw gyro reading.
I think it will be way better and more precise to also use the data from the accelerometers in the wiimote to double correct and estimate the degree of rotation of the axis. If so, i think your program will be improved in a way that even a very slow and small scale motion can be detected and translate as the mouse movement, but not a hand tremor!! I would like to know if that gonna works out well ^_^
Thank you for your nice idea. I think accelerometers can help motion plus to improve motion sensitivity. I will report something if it works out well.
does the above code return angular velocity (deg/s) or actual angle of rotation (deg). It should be velocity since it's directly from the gyro, right? Then how did you come up with something like this in your source code?
Yes, MotionPlusState.RawValues.X returns angular velocity. But it does not represent actual value of [deg/s]. “RowValues” means row output of gyroscopic device, not a physical value. So we should interpret it as a first-order translation : RawValues.X = a * (actuial angular velocity) + offset. That’s why I normalized the gyro values.
so based on those, u r not really dealing with the actual degree of rotation? but using the non-linear translation of the rate of change of the angle, which is the normalized raw data from the motion plus? Can i assume i can use the same non linear translation with a regular analog gyro output? Thanks
The non-linear translation, Math.Pow(NORMALIZED_VALUE, 1.3) is for the sake of smooth cursor movement. You would have noticed that small/large mouse movement is translated into slow/fast cursor movement. Finally, multiplying constant value is just because scaling its distance. 120 and 1.3 are heuristic values. You can change their setting to make it more comfortable.
Wiimote button functions are as follows "A" → mouse left button "B"(press) → enable the gyroscope "B"(release) → disable the gyroscope "←→↑↓" → arrow key "-" → Back Space key "+" → Enter key "home" → Windows key "1" → mouse right button "2" → ALT key
Can you calibrate it so the cursor is directly in line with the wii so you can make a light gun?
pietzeekoe 9 months ago
Too primitive to be popular. The darn thing looks like a TV remote. LOL
MyTube22T 1 year ago
i downloaded your source and run with my wiimote motion plus, after i clicked "connect" and activate the gyro sensing by holding "B" button, the cursor will automatically move very fast to the left, no matter what orientation the wiimote is, the cursor will always move to the left and hit the bound? Is it because Im running the application under windows 7?
tekadanieL328 1 year ago
@tekadanieL328 (1)
Sorry for late response, but I couldn’t reproduce your problem. I doubt whether it’s because of OS.
Probably, the property of your gyroscopic sensor is different from mine. In my source “Form1.cs”, line 132 through 160 are the process which translate gyro values to mouse motion. There are GYRO NEUTRAL values for x, y, z axis. I think it’s because these constant values are inappropriate for your motion plus.
objectiveK2 1 year ago
@tekadanieL328 (2)
In order to reconfigure, put your motion plus into static position and see the stable gyro values (ex. “Console.WriteLine(ws.MotionPlusState.RawValues.X);”), then rewrite GYRO NEUTRAL values into that values.
IDE is Microsoft Visual C#. Would you try it ?
objectiveK2 1 year ago
@objectiveK2
Thank you very much for your advice. After that problem, i decided to try with my other motion plus (since i have three of them), and it works out well on my 3rd black motion plus i bought from HK. Based on this condition and you explanation, i can conclude that, it just a matter of the constant biasing value. And i can also see that in your C# code, you are using constant value to take the offset off the raw gyro reading.
tekadanieL328 1 year ago
@objectiveK2
I think it will be way better and more precise to also use the data from the accelerometers in the wiimote to double correct and estimate the degree of rotation of the axis. If so, i think your program will be improved in a way that even a very slow and small scale motion can be detected and translate as the mouse movement, but not a hand tremor!! I would like to know if that gonna works out well ^_^
tekadanieL328 1 year ago
@tekadanieL328
Glad to know your wiimote has worked out well !
Thank you for your nice idea. I think accelerometers can help motion plus to improve motion sensitivity. I will report something if it works out well.
objectiveK2 1 year ago
@objectiveK2
I have a little question for you.
MotionPlusState.RawValues.X
does the above code return angular velocity (deg/s) or actual angle of rotation (deg). It should be velocity since it's directly from the gyro, right? Then how did you come up with something like this in your source code?
(120.0 * Math.Pow((double)Math.Abs(rawValue) / 7859.0, 1.3))
this looks like you taking ratio of how much the data is off from the offset, and power and multiply to get interpolated linear movement.
tekadanieL328 1 year ago
@tekadanieL328
Thank you for your question.
Yes, MotionPlusState.RawValues.X returns angular velocity. But it does not represent actual value of [deg/s]. “RowValues” means row output of gyroscopic device, not a physical value. So we should interpret it as a first-order translation : RawValues.X = a * (actuial angular velocity) + offset. That’s why I normalized the gyro values.
objectiveK2 1 year ago
@objectiveK2
so based on those, u r not really dealing with the actual degree of rotation? but using the non-linear translation of the rate of change of the angle, which is the normalized raw data from the motion plus? Can i assume i can use the same non linear translation with a regular analog gyro output? Thanks
tekadanieL328 1 year ago
@tekadanieL328
The non-linear translation, Math.Pow(NORMALIZED_VALUE, 1.3) is for the sake of smooth cursor movement. You would have noticed that small/large mouse movement is translated into slow/fast cursor movement. Finally, multiplying constant value is just because scaling its distance. 120 and 1.3 are heuristic values. You can change their setting to make it more comfortable.
objectiveK2 1 year ago
tht's great
do u need an IR bar in order to move the mouse cursor?
i can't move the cursor
vannismatthew 2 years ago
you need a "MotionPlus", not an IR bar.
Wiimote button functions are as follows "A" → mouse left button "B"(press) → enable the gyroscope "B"(release) → disable the gyroscope "←→↑↓" → arrow key "-" → Back Space key "+" → Enter key "home" → Windows key "1" → mouse right button "2" → ALT key
objectiveK2 2 years ago
Nice! Looks really smooth. =)
Pvsmuntje 2 years ago
thank you!
objectiveK2 2 years ago