Configuring own joystick input with python-uinput
-
Hi everyone
I'm using Raspberry Pi 3 to make an arcade gaming console. I want to make it as modular as possible, which means I want to make the joystick separately, using an arduino nano v3. I don't want to use the GPIOs to send the button signals. What I want to do is create an USB controller with that arduino, send the signals through the serial port and receive them with a python program running in background, which will be the responsible of 'pressing' the correct keys in a virtual keyboard.
I'm just at the beginning of the project. I have implemented a working program which successfully 'presses' the right arrow into the EmulationStation menu.
The code I've been using is here, and I execute it in the /usr/bin/emulationstation script (python program &):
It's simple, it was just a test to make sure everything was correct. But to my surprise, when I start a game, the button 'pressed' is not recognised by the game. I know the python program is still running because when I exit from the game, it keeps changing the emulationstation menu. I've tryed to execute the program again at the runcommand-onstart script, but it didn't work.
So here is my question: Is there any way to send that keypress to the emulator? What am I doing wrong?
Thanks in advance
PD: I'm using Raspberry pi 3, my psu is the official one (2 Amp), the os is the premade sd image from the web, and I have tryed it with several emulators. I load the uinput module before running the program, and as I have said before, the program works fine in emulationstation menu. I have been searching for a while and I couldn't find any useful information about that
-
Hello, are you sure that emulator have binded "right key" ? I mean, if emulator doing something when you press right arrow on keyboard?
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.