2 different controllers

This topic contains 2 replies, has 2 voices, and was last updated by  deepdivered 1 year, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #105715


    hi i am making a handheld unit. i want to be able to also hook it up to a tv and have it be like a console. the handheld controls i am hooking up to the gpio. when i use it as a console i wanted to be able to hook in my xbox 360 wireless controller usb receiver and have it run up to 4 players.

    is there away to setup 2 sets of inputs for player 1? 1 for the gpio and another set for the xbox360 wireless controller? then when i plug in the wireless p1 will still work without having to reconfigure?

    if not what would be the best way to do this to make reconfiguring quick and easy.



    I would think you could do this with a script that detects the receiver has been plugged in (maybe polls lsusb?) and then in turn swaps (i.e. renames) controller config files (and maybe does the reverse upon disconnect).

    I’m not enough of a linux guru to give you all the commands you’d need, but I know this is doable. There are probably more elegant ways of doing this than constantly polling something (memory, CPU use), but unfortunately I have to defer to the real experts that know how. Perhaps you could add it to the Emulation Station menu the way kodi has been added and just run it manually when you need to switch. Not as automated, but much easier, I’m sure.

    Edit: Here’s a copy-paste for you:

    This explains how you could run a script made by you (say /usr/local/my_script) when you plug a specific USB device.

    1. First run lsusb to identify your device. Example:
    Bus 004 Device 001: ID 0000:0000
    Bus 003 Device 001: ID 040a:0576 Kodak Co.
    Bus 002 Device 001: ID 0000:0000
    Bus 001 Device 001: ID 0000:0000

    2. After doing this you know that
    – the vendor ID of your device is 040a
    – the product ID of your device is 0576

    3. Now is time to create your UDEV rule:

    sudo nano /etc/udev/rules.d/85-my_rule.rules

    4. And add the text

    ACTION==”add”, SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”040a”, SYSFS{idProduct}==”0576″, RUN+=”/usr/local/my_script”

    When the usb_device product identified as 0576 of vendor 040a is added, run /usr/local/my_script
    Note that ‘==’ and “!=” are comparators, while = and += are assingments

    ^ That will probably work, I would think.



    thanks! i decided having a hand held with a controller going to it would be kinda silly , so i made a controller with enough buttons (16) to handle most games , wont be able to do any psx games that need 2 analog sticks…..oh well haha

Viewing 3 posts - 1 through 3 (of 3 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

PLEASE NOTE: All orders that are placed between January 14th and January 28th will be shipped on January 29th. Dismiss