activer bouton arcade gpio
-
@Jimmy14 said in activer bouton arcade gpio:
What configuration did you attempt ? Post your
config.txt
, surrounded by code blocks (threee backticks -```
). -
# http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output #hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable infrared communication. #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] #dtoverlay=vc4-fkms-v3d gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1 # use one joystick with 13 buttons dtoverlay=gpio-joystick,joy1,joy1-hotkey ```
-
Hi @Jimmy14 I am the maintainer of the Arcade-DT project on Github. I guess we can identify the issue together.
-
@Jimmy14 do you have the file
gpio-joystick.dtbo
in theoverlay/
folder, .i.e. What is the output of:find /boot/ -type f -iname "gpio-joystick.dtbo"
-
@Lolonois
Hello Lolonois, Thanks for your reply. To simplify things, I installed a Retropie image with Raspberry Pi Manager on another micro SD card to have a clean installation. I'll perform the manipulations on this OS with a Raspberry Pi Zero and apply it to my original OS when it works. I'm French and not very familiar with English, but Google Translate should do the trick for us to understand each other π So I apologize in advance for any typos I might make π Where do you want to start? Thanks -
You're welcome. No worries about any typos, my mother tongue is also not English. But I guess with this setup we get along. If I cannot make any sense of a automatically translated sentence I will ask you again anyway.Also if you translate anything from my statements which does not make sense, I am happy to rephrase it.
That said, as Mitu checked already the config.txt file and it looks correct to me. Let's check if you have the file
gpio-joystick.dtbo
.Excecute the next command on the Pi and provide the output here please:
find /boot/ -type f -iname "gpio-joystick.dtbo"
-
@Lolonois
First problem, I started the whole installation from scratch so as not to be bothered by any changes I had made before, but now I can't even perform the first command line. I created an account on the site, but it still doesn't work. When I first installed Arcade DT, I didn't need to create an account. -
-
@Jimmy14 You mis-spelled the repository URL, the final part is arcade-dt and not arcarde-dt.
-
@mitu
π -
I installed the arcade-dt package again, when installing the kernel headers the first option with the 4 lines did not work so I installed with the second option.
The rest of the installation is well passed I think and after verification I have the gpio-joystick.dtbo file in the boot/overlays folder.
In the boot/config.txt file I copied the following configuration:
use one joystick with 13 buttons
Dtoverlay=gpio-joystick,joy1,joy1-hotkey
I connected a button to the gpio port that corresponds to the A button to test proper operation but nothing happens.
I don't know if I forgot to do something or if I got the wrong place.
And is it possible to connect the buttons of player 2 only or it is mandatory to connect the buttons of player 1?
I ask for it because I have a 1.69 inch tft screen connected to the gpio port (it is not active for the moment) and the screen uses 4 gpio port identical to the player 1 connection while if I can use player 2 there are only 2 buttons that are also used by the screen and I would have to be able to change the connection of these two gpio ports to another gpio port so that it is no longer connected in the same place as the screen.
I don't know if I'm clear in my explanation.
-
-
in English ;)
-
Thanks for the verbose input.
Let's reduce complexity of your setup a bit.
First: Can you assure that no overlay ("driver") is loaded for the TFT screen in the
config.txt
. I guess you know what to disable (#
) in theconfig.txt
to start without the TFT screen and with HDMI only for the moment. Also remove any wire from the TFT to the GPIO.Second: You don't have to wire anything for the Joysticks at the moment. Let's start with one Joystick (
joy1
and hotkey if you want).After the TFT is disabled in the config.txt and one Joystick is enabled: Reboot and run this command
sudo evtest
. You should get an output like (one Joystick with HotkeyBTN_MODE
in the example below):$ sudo evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: GPIO Arcade Joystick 1 Select the device event number [0-0]: 0 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "GPIO Arcade Joystick 1" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 304 (BTN_SOUTH) Event code 305 (BTN_EAST) Event code 307 (BTN_NORTH) Event code 308 (BTN_WEST) Event code 310 (BTN_TL) Event code 311 (BTN_TR) Event code 314 (BTN_SELECT) Event code 315 (BTN_START) Event code 316 (BTN_MODE) Event code 544 (BTN_DPAD_UP) Event code 545 (BTN_DPAD_DOWN) Event code 546 (BTN_DPAD_LEFT) Event code 547 (BTN_DPAD_RIGHT) Properties: [...]
You may get presented more event devices, pick the number which relates to "GPIO Arcade Joystick 1".
Do you get this output? -
Yes, I assure you that no driver is loaded in the config.txt file for the TFT display. It's not even connected to the socket; only the wires are soldered to the Raspberry Pi Zero's GPIO.
Here are the results:
-
Great. The output means software side is working as expected.
Now, if you let
sudo evtest
running and then connect a button or GPIO pin to Ground (GND) you should get a signal fromevtest
on the screen. Any button is low active (i.e. when the voltage level is 0 it means a button is pressed). When a button is unpressed (open) the voltage is 3.3V. -
@Lolonois
It's good, it works in player 1, but how do I modify the button input GPIOs so that they are no longer on the same GPIOs used by the TFT screen? -
I noticed a small error (I would even say that it is an incisive detail) but I connected the A player 1 button and it is the B player 1 button which is detected, is this normal or a problem coming from my configuration?
-
As I explained above, I'm using a TFT screen connected to GPIO in this configuration.
The problem is that the GPIO connections for Player 1's buttons are identical to four GPIO connections on my screen, and for Player 2, there are two GPIO connections identical to those on the screen. (See diagram above.) -
@Jimmy14 said in activer bouton arcade gpio:
I connected the A player 1 button and it is the B player 1 button which is detected, is this normal or a problem coming from my configuration
This is not specific to your configuration. The assignment could be flipped in the
*.dts
source files (or in RetroArch in upper software layer), but don't go that way (yet) - see my next answer on your next 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.