Page 3 of 26 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 260

Thread: HOWTO: Wii remote in Ubuntu 8.04

  1. #21
    Join Date
    Mar 2008
    Beans
    4

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Instead of installing mousemu, I use the command "sudo modprobe uinput" before running wminput for the first time after a reboot. It seems to work. Also using this, the buttons seem to be mapping to keyboard buttons using the accelerometer as a pointer. I haven't edited any configuration files since intalling the packages originally.

  2. #22
    Join Date
    Apr 2008
    Location
    In front of my iMac...
    Beans
    364
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Now that Cyborg mentions that...I can actually use my - and + buttons to go to the previous and/or next song, the Home button as Play/Pause, 1 and 2 for volume up and down, and so on, while my wiimote acts as a pointer by using the ABS_X and ABS_Y options on /etc/cwiid/wminput/ir_ptr... I did it following this how-to...weird...I can map any button or key and still use the wiimote's pointer to control the mouse cursor...

    Did it work like that to anyone else?...Or is it just the way it's supposed to work and I'm stupid?.........
    Last edited by Toshibawarrior; June 24th, 2008 at 01:42 AM.
    7$]-[!8@\|//\Rr!0|2!!!
    =D>
    My Little Ubuntu Blog!

  3. #23
    Join Date
    Mar 2008
    Beans
    4

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Toshibawarrior: That's what people have been saying. Keyboard mappings work fine using ABS_X, and don't work when using REL_X.
    I have them working with both though, and the only difference between my setup and the one described here is using "sudo modprobe uinput" instead of installing mousemu, as far as I can tell

  4. #24
    Join Date
    Apr 2008
    Location
    In front of my iMac...
    Beans
    364
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Oh, ok, sorry about that. I guess I'm just stupid then. Anyways, I didn't even tried using the REL_X/Y thing...I went straight to ABS_X/Y...

    For a minute there I thought that no key/button mappings worked while using the wiimote as a mouse...I guess they were just talking about the REL thing...sorry...

    I feel stupid...I'm just a noob at Linux, and let alone using wiimotes as mouses... ...but I guess you guys noticed this already...

    Anyways...I hope I can get the hang of this...I used to be one of the best "technicians" among my friends for Windows...what a waste of my life...now that I've seen the light, I'm never ever going back. So I'm back at learning the basics from the ground up...
    Last edited by Toshibawarrior; June 24th, 2008 at 02:10 AM.
    7$]-[!8@\|//\Rr!0|2!!!
    =D>
    My Little Ubuntu Blog!

  5. #25
    Join Date
    Aug 2007
    Beans
    86
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: HOWTO: Wii remote in Ubuntu 8.04

    OK. Lots of things to go over. I'm having a hard time keep track of who's who, so if the "you" applies to you, then it means you. If it doesn't, then that you is not you.

    What are you using as an infrared source when using ir_ptr? Short of turning my Wii on and using its bar, I don't have one. I've tried using an incandescent light bulb as suggested, but it didn't work for me.

    This is why I'm stuck using acc_ptr.
    The difference between ABS and REL is this. When using the IR pointer, ABS works, because where you point it determines the actual mouse POSITION (the absolute position). When using the acceleration data, however, you need to use REL (relative position) because the way you tilt the WiiMote will determine where the mouse MOVES relative to its current position. If I was to use ABS with acc_ptr, I'd have to keep moving the WiiMote to keep it in a certain position, or else it would jump to a corner or the center. Thus, I HAVE to use REL or it would be near impossible to control the mouse.

    Again, if you can use IR and therefore the ABS fucntions, you can map all buttons. However, if you cannot, like me, and need to use REL functions, an apparent bug makes it impossible to map keyboard functions to the other buttons.

    On to the other issue, the nunchuk joystick. There are commands for using it, but they're hidden. I think they're hidden because they don't work yet. If you open the file /usr/share/doc/wminput/wminput.list it has the list of available commands. This is identical to the options found in the config files, with two additional commands.

    Nunchuk.Stick.X
    Nunchuk.Stick.Y

    However, if I try to set these to either set (ABS or REL), my mouse pointer immediately jumps to the lower right hand corner of my screen and I can no longer move it away from there.

    This tells me that nunchuk joystick functions are in the works, but not yet functional.

    As far as nunchuk/IR stuff. The nunchuk uses no IR at all. Only acceleration data, which is purely how you hold the nunchuk. So yes, it does have cursor movement, but no, it's not based on IR. That being said, I'm somewhat surprised it would cause your cursor to move, as I thought you'd have to use wminput -c nunchuk_acc_ptr for it to affect your mouse.

    I would also suggest using the WMGUI utility to test your nunchuk. Run it, go to the "settings" menu, then select extension data. This will then activate the "Nunchuk" section, and you can move your nunchuk around and see how the data changes. You can also see the difference between it and the "IR" section.

  6. #26
    Join Date
    Aug 2006
    Location
    Australia
    Beans
    1,438

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Quote Originally Posted by paulderol View Post
    ... can i bind the zoom functions to the up/down axis on the d-pad either in the wiimote setup or in the zoom configuration? and you did confirm that doing this does nothing internally to the wiimote, correct?
    It changes nothing in your wiimote, - go and have some fun with it in Ubuntu now!

    To make your wiimote zoom in / zoom out:
    Code:
    gedit /etc/cwiid/wminput/buttons
    Then change the keybindings for Wiimote.Up and Down to look like this:
    Code:
    Wiimote.Up	= KEY_F6
    Wiimote.Down	= KEY_F7
    By doing this, you've bound F6 and F7 to your up and down buttons on your wiimote.
    Then it's just a matter of going into Compiz Config Settings Manager
    (sudo aptitude install compizconfig-settings-manager if you haven't already got it installed) and binding F6 and F7 to zoom in and zoom out.
    Work smart, not hard.

  7. #27
    Join Date
    Aug 2006
    Location
    Australia
    Beans
    1,438

    Re: HOWTO: Wii remote in Ubuntu 8.04

    I have updated the howto to reflect Cyborg_572's wonderful help in resolving the problem of not being able to bind keyboard keys to your wiimote while using REL_X and REL_Y accelerometer input.

    For those who followed my howto before 24th June 2008 and have this problem, this can be easily resolved:


    Get rid of mouseemu, this is the cause of the problem:
    Code:
    sudo aptitude remove mouseemu
    When prompted respond with y to remove the mouseemu package (there may be another library that mouseemu used, just press y and it might remove this extra library too).
    Alternatively you can just go into Synaptic package manager and remove the mouseemu package that way.


    Unless you want to run sudo modprobe uinput every time you start Ubuntu, it's recommend you make it automatically run upon Ubuntu start up.
    Code:
    gksudo gedit /etc/rc.local
    Insert this line before exit 0:
    Code:
    modprobe uinput
    So the whole file should look exactly like this:
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    modprobe uinput
    
    exit 0
    You may restart your computer for the settings to take effect, or if you're impatient and want to play with your Wii remote now (without having to restart your computer) you can run this:
    Code:
    sudo modprobe uinput

    Now you should have full functionality of you wiimote no matter what tracking mode it's in.
    Last edited by Rhubarb; June 24th, 2008 at 06:07 AM.
    Work smart, not hard.

  8. #28
    Join Date
    Apr 2008
    Location
    In front of my iMac...
    Beans
    364
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Quote Originally Posted by Rhubarb View Post
    I have updated the howto to reflect Cyborg_572's wonderful help in resolving the problem of not being able to bind keyboard keys to your wiimote while using REL_X and REL_Y accelerometer input.

    For those who followed my howto before 24th June 2008 and have this problem, this can be easily resolved:


    Get rid of mouseemu, this is the cause of the problem:
    Code:
    sudo aptitude remove mouseemu
    When prompted respond with y to remove the mouseemu package (there may be another library that mouseemu used, just press y and it might remove this extra library too).
    Alternatively you can just go into Synaptic package manager and remove the mouseemu package that way.


    Unless you want to run sudo modprobe uinput every time you start Ubuntu, it's recommend you make it automatically run upon Ubuntu start up.
    Code:
    gksudo gedit /etc/rc.local
    Insert this line before exit 0:
    Code:
    modprobe uinput
    So the whole file should look exactly like this:
    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    modprobe uinput
    
    exit 0
    You may restart your computer for the settings to take effect, or if you're impatient and want to play with your Wii remote now (without having to restart your computer) you can run this:
    Code:
    sudo modprobe uinput

    Now you should have full functionality of you wiimote no matter what tracking mode it's in.
    GREAT!...I re-read everything and now i get it...I'm sorry to ask obvious or already answered questions...

    As for me, I'll keep using the ABS (IR tracking)...since I don't what difference there is between ABS and REL...(I believe REL doesn't use IR? I'm on the dark on this).

    Anyways, ABS has worked for me, and I have my wiimote running smoothly...with a Nyko wireless sensor-bar...not the one connected to the Wii.

    So if anyone can tell me the advantages of REL please do. If I'm not mistaken REL uses the wiimote as a joystick, without IR ... but I may be wrong...Rhubarb is the one who can actually throw some light my way on this.
    7$]-[!8@\|//\Rr!0|2!!!
    =D>
    My Little Ubuntu Blog!

  9. #29
    Join Date
    Apr 2008
    Location
    In front of my iMac...
    Beans
    364
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Wii remote in Ubuntu 8.04

    If I use the uinput thing on the script...will my two icons (turning wminput on and off like you said on your how-to) still work? Or will i have to change something else on the icons' config?...

    I know that I'll need to add the uinput thing to the startup processes and stuff, but is there something else?...
    7$]-[!8@\|//\Rr!0|2!!!
    =D>
    My Little Ubuntu Blog!

  10. #30
    Join Date
    Aug 2006
    Location
    Australia
    Beans
    1,438

    Re: HOWTO: Wii remote in Ubuntu 8.04

    Quote Originally Posted by Toshibawarrior View Post
    If I use the uinput thing on the script...will my two icons (turning wminput on and off like you said on your how-to) still work? Or will i have to change something else on the icons' config?...
    I know that I'll need to add the uinput thing to the startup processes and stuff, but is there something else?...
    Yes, everything will still work perfectly (well, actually even better than before if you where using REL_X/Y), and there's nothing more to do to make it work.

    The REL_X/Y is good if you don't have a sensor bar / IR source. Basically, just tilt your wiimote and the cursor goes in that direction (REL_X/Y can really only be used with accelerometers only - no IR, but as stated in my last sentance here, it's possible to use ABS_X/Y with the accelerometers).
    Just try it yourself by running:
    Code:
    wminput
    If you're feeling a little adventurous, it's possible to use ABS_X/Y with the accelerometers - this way your mouse cursor centres in the middle of the screen when your wiimote is horizontal.
    Last edited by Rhubarb; June 24th, 2008 at 03:04 PM.
    Work smart, not hard.

Page 3 of 26 FirstFirst 1234513 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •