wiimote

Is it possible to use a wiimote as an android game controller?

点点圈 提交于 2021-02-07 20:59:56
问题 I have been interested in using a Wiimote as a controller for Android for a long time. I know this was possible many years ago before the methods for creating an l2cap socket were removed from the Android api. In api 29 (Android 10) methods for creating an l2cap socket were added, so theoretically it should now be possible to to use a Wiimote as a controller. I create and try to connect to the socket like this: BluetoothSocket socket = mWiimote.createInsecureL2capChannel(0x13); socket.connect

Is it possible to use a wiimote as an android game controller?

∥☆過路亽.° 提交于 2021-02-07 20:59:24
问题 I have been interested in using a Wiimote as a controller for Android for a long time. I know this was possible many years ago before the methods for creating an l2cap socket were removed from the Android api. In api 29 (Android 10) methods for creating an l2cap socket were added, so theoretically it should now be possible to to use a Wiimote as a controller. I create and try to connect to the socket like this: BluetoothSocket socket = mWiimote.createInsecureL2capChannel(0x13); socket.connect

How do I simulate mouse clicks with Xlib on Python

时光毁灭记忆、已成空白 提交于 2021-02-06 13:47:23
问题 For educational purposes I've set out to write a python script using cwiid and Xlib so that I can use my wiimote like a mouse. So far I've gotten the cursor to move by calling disp.warp_pointer(dx,dy) then calling disp.sync() every set time interval. I'm afraid that it might not be the most efficient way to do it but at least for now, it's simple and works well enough. The problem I'm having more difficulty with is mouse clicks. How do I simulate a mouse click in Xlib? I would like separate

Reducing wiimote pitch/roll variations

天涯浪子 提交于 2020-02-10 04:29:27
问题 I want to use the wiimote to control a cursor WITHOUT the infrared sensor bar. I'm using the pitch and roll values for this. The problem is that when the pitch is close to 0 degrees, the roll is very unstable, and when the pitch is close to 90 degrees, it is itself very unstable, but the roll is fine. Im polling the wiimote very frequently, so im averaging the last 20 values for both pitch and roll, and I can get the cursor to go where I want. The only problem is that there is still alot of

Converting angular velocities to orientation Wii Motionplus

瘦欲@ 提交于 2019-12-12 01:27:57
问题 I'm working on the Wii Motionplus and I've extracted the raw values using WiimoteLib Library. However, when I normalize it, I get random values that don't tally with what is actually happening. This is how I'm normalizing: Calibrate the Motionplus (i.e. Find the raw value that corresponds to zero; I do this by holding it stationary for a point of time) For every subsequent raw value read, I subtract the zero value from it to get the "relative" raw value. Then, I scale this value using http:/

Wiimote orientation as a 3D vector

旧时模样 提交于 2019-12-07 21:04:34
问题 I wonder if it is possible, as the Wiimote has 3 accelerometers, to convert the accelerometers readings to a 3D vector. I know the trick to extract pitch/roll, but it only uses the X and Z accelerometers, and has the gimbal lock problem. What I would like is a full 3D vector, that can be converted to a quaternion rotation representation. 回答1: Thinking about it further, the accelerometers values are the components of the vector I was looking for... You only have to express the shortest arc

Wiimote orientation as a 3D vector

泪湿孤枕 提交于 2019-12-06 11:34:06
I wonder if it is possible, as the Wiimote has 3 accelerometers, to convert the accelerometers readings to a 3D vector. I know the trick to extract pitch/roll, but it only uses the X and Z accelerometers, and has the gimbal lock problem. What I would like is a full 3D vector, that can be converted to a quaternion rotation representation. Thinking about it further, the accelerometers values are the components of the vector I was looking for... You only have to express the shortest arc between a reference vector and this vector as a quaternion. For example, if accel is a (normalized) vector