RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Joystick connected automatically

    Scheduled Pinned Locked Moved Help and Support
    joystickscriptrasberry pi
    4 Posts 2 Posters 386 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eliotullmo
      last edited by

      Hello
      I am pretty new to retropie. So I might not know if it's possible. But could we made a file.txt that can be run through the rasberry terminal and can connect an input automatically.
      For instance if i would want a play with a joystick i will only need to run my file and my joystick would already be connected.
      I think it would be pretty cool.
      Thanks
      Eliot

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Not sure what problem are you trying to solve ?

        You can configure your gamepad once in EmulationStation (see here)and this will generate the correct configuration files needed. Each time you'd connect the joystick again, it will be detected and configured automatically, just as you've set it up at the beginning.

        E 1 Reply Last reply Reply Quote 0
        • E
          eliotullmo @mitu
          last edited by

          @mitu Thank you for the answer.
          My idea is to make an arcade as functional as possible. It means that i can connect different inputs (steering wheel,joysticks, Control gloves maybe). If i code one of these inputs with an arduino, my idea was to send with the arduino and a python code to the rasberry a code that will automatically connect my input to retropie.
          I've tried to make a python code that will emulate an xbox 360 controller but i can't make it work.
          Do you think my idea is possible. If so, how.
          Hope my project is more clear.
          Best regards
          Eliot

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by mitu

            There are 2 different things here:

            • turning an Arduino powered device into an Linux compatible HID/Input device. This is handled by both your code on the external MCU and the host (Linux) driver. Such a driver can be implemented, as you have tried already,

              • with a python script, using Linux uinput support to simulate/emulate a standard Linux input device
              • with Linux kernel module (more complicated, but perhaps better performance if you deal with GPIO).
            • configuring said device for emulators/EmulationStation. This part is easy as long as the first part is correctly implemented - for RetroPie it will look just like a controller. You configure the device in ES, the configuration is saved and automatically loaded each time the device in question is connected - you don't have to send any file (but see below).
              Note: the auto-configuration is dependant on the device name, so if you with to have different configurations, you'd have the code developed in previous step to send a different device name for each configuration you wish to implement.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.