Prerequisites:
- A wiimote
- A wiimote nunchuk
- A linux system with the uinput kernel module
- Clone my fork of cwiid into a directory of your choice(wiimouse for example here)
git clone https://github.com/trtg/cwiid.git wiimouse
-
cd wiimouse
aclocal
autoconf
./configure --with-cwiid-config-dir=/etc/cwiid/
make
sudo make install
Note that by default this will install everything using a prefix of /usr/local unless you pass --prefix=some_other_directory to configure so make sure whatever prefix you use is in your path.sudo modprobe uinput
- Create a new config file for the plugin I wrote by creating the file /etc/cwiid/nunchuk_stick_ptr and adding the text below to it
include buttons
Plugin.nunchuk_stick_ptr.X = REL_X
Plugin.nunchuk_stick_ptr.Y = REL_Y
sudo wminput -c nunchuk_stick_ptr
You will see this message appear:Put Wiimote in discoverable mode now (press 1+2)...
Do as it says and press buttons 1 and 2 on the wiimote then release them, the LEDs on the wiimote will blink for a while then the terminal where you entered the previous command will say:Ready.
- Now try moving the nunchuk analog stick and it should move your cursor around. Adjust /etc/cwiid/wminput/buttons if you want to change button mappings
KERNEL=="uinput",GROUP="wheel",MODE="0660"
If you've already loaded the uinput kernel module prior to creating this file, you'll have to unload the module:
sudo rmmod uinput
and then reload it:
sudo modprobe uinput
Now you should be able to run wminput without sudo (assuming your user is in the wheel group)