Showing posts with label mouse. Show all posts
Showing posts with label mouse. Show all posts

Sunday, December 30, 2012

Wiimote+nunchuk web surfing in linux

At this point, messing around with the wiimote probably seems dated, but hey, I have one lying around with a motionplus and nunchuk. The final outcome of this post if you follow it- you'll be able to control your mouse cursor with the nunchuk analog stick, scroll up/down/left/right with the wiimote d-pad and left/right click with either the wiimote or the nunchuk. Let's get started.

Prerequisites:
  • A wiimote
  • A wiimote nunchuk
  • A linux system with the uinput kernel module
Procedure:
  1. Clone my fork of cwiid into a directory of your choice(wiimouse for example here)
    git clone https://github.com/trtg/cwiid.git wiimouse
  2. cd wiimouse
  3. aclocal
  4. autoconf
  5. ./configure --with-cwiid-config-dir=/etc/cwiid/
  6. make
  7. 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.
  8. sudo modprobe uinput
  9. 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
  10. 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.
  11. 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
Note: if you do not want to have to run wminput as root, you can configure things so that uinput may be accessed by users in the wheel users group. To make this happen, create a udev rules file in /etc/udev/rules.d/ with a name of your choosing, for example /etc/udev/rules.d/uinput.rules which contains the following line of text:

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)

Sunday, August 2, 2009

evoluent vertical mouse

soon...

gyration airmouse

This mouse is the more compact, but less ergonomic (IMHO) version of the go pro. The kit consists of a mouse an RF transceiver dongle which hides in the mouse itself when not in use, and a zippered pouch for the mouse. Standard alkaline batteries are needed (the mouse comes with two). The key points for me: unless you have very small hands, the mouse is awkward to hold up in the air. The movement tracking is really not that great especially if you inadvertently roll the mouse at all. It's too easy to brush your fingers under the optical sensor of the mouse while holding it up in the air. There does not appear to be a way to disable the traditional/optical mouse functionality, which makes aforementioned problem even worse. My main interest at this point is tearing it down to see if some sort of wearable, wireless pointing device can be hacked out of it since it is so small and lightweight.

alphagrip chording keyboard + trackball

This is my current input device with which I'm mostly satisfied. I'll post soon about some of my customizations.

Cirque smartcat/pro touchpad

The only reason to buy the pro, in my view, is to get a distinct third button for linux paste capability.

Fingerworks iGesture



Imagine half of a touchstream, without the typing capability, and this is what you get. Just like the touchstream, the USB cord is not detachable and poses a potential point of failure. The picture above shows an improvised strain relief on the cord using hot glue.