Joystick connected automatically
-
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 -
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.
-
@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 -
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 Linuxuinput
support to simulate/emulate a standard Linux input device - with Linux kernel module (more complicated, but perhaps better performance if you deal with GPIO).
- with a
-
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.
-
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.