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

    activer bouton arcade gpio

    Scheduled Pinned Locked Moved Help and Support
    gpiobouton arcade
    31 Posts 3 Posters 1.6k 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.
    • J
      Jimmy14
      last edited by

      bonjour a tous,
      j'aimerai connecter 13 boutons(haut,bas,gauche,droite,start,select,a,b,x,y,L,R et Hotkey) a mon Raspberry pi zero v1.3 en les soudant sur les port GPIO mais je ne trouve pas comment les activé.
      j'utilise la version 4.8 de retropie installé sur un Raspberry pi zero v1.3
      l'image a était telecharger par et monter le logiciel Raspberry Pi imager
      j'ai trouver sa mais je doit me tromper a un endroit car se n'ai pas concluant.
      https://github.com/gemba/arcade-dt
      merci de votre aide

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

        This is an English speaking forum, please use English for your posts.

        J 1 Reply Last reply Reply Quote 0
        • J
          Jimmy14 @mitu
          last edited by

          @mitu
          Hello everyone,

          I would like to connect 13 buttons (up, bottom, left, right, start, select, a, b, x, y, L, R and Hotkey) to my Raspberry pi zero v1.3 by soldering them to the GPIO ports but I can't find how to activate them.

          I use version 4.8 of retropie installed on a Raspberry pi zero v1.3

          The image was downloaded by and mounted the Raspberry Pi imager software

          I found it but I must be wrong somewhere because it's not conclusive.

          Https://github.com/gemba/arcade-dt

          Thank you for your help

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

            @Jimmy14 said in activer bouton arcade gpio:

            Https://github.com/gemba/arcade-dt

            What configuration did you attempt ? Post your config.txt, surrounded by code blocks (threee backticks - ```).

            J 1 Reply Last reply Reply Quote 0
            • J
              Jimmy14 @mitu
              last edited by

              @mitu

              # 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 ```
              LolonoisL 1 Reply Last reply Reply Quote 0
              • LolonoisL
                Lolonois
                last edited by

                Hi @Jimmy14 I am the maintainer of the Arcade-DT project on Github. I guess we can identify the issue together.

                J 1 Reply Last reply Reply Quote 0
                • LolonoisL
                  Lolonois @Jimmy14
                  last edited by

                  @Jimmy14 do you have the file gpio-joystick.dtbo in the overlay/ folder, .i.e. What is the output of:

                  find /boot/ -type f -iname "gpio-joystick.dtbo"

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jimmy14 @Lolonois
                    last edited by

                    @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

                    1 Reply Last reply Reply Quote 0
                    • LolonoisL
                      Lolonois
                      last edited by

                      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"

                      J 2 Replies Last reply Reply Quote 0
                      • J
                        Jimmy14 @Lolonois
                        last edited by

                        @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.

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          Jimmy14 @Jimmy14
                          last edited by

                          IMG_4079 - Moyenne.jpeg

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

                            @Jimmy14 You mis-spelled the repository URL, the final part is arcade-dt and not arcarde-dt.

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              Jimmy14 @mitu
                              last edited by

                              @mitu
                              😅

                              1 Reply Last reply Reply Quote 0
                              • J
                                Jimmy14 @Lolonois
                                last edited by

                                @Lolonois

                                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.

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  Jimmy14 @Jimmy14
                                  last edited by

                                  Capture d’écran 2025-04-25 à 09.23.16.PNG

                                  IMG_4081 - Moyenne.jpeg

                                  IMG_4083 - Moyenne.jpeg

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    Jimmy14
                                    last edited by

                                    IMG_4086.PNG

                                    in English ;)

                                    1 Reply Last reply Reply Quote 0
                                    • LolonoisL
                                      Lolonois
                                      last edited by

                                      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 the config.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 Hotkey BTN_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?

                                      J 1 Reply Last reply Reply Quote 0
                                      • J
                                        Jimmy14 @Lolonois
                                        last edited by

                                        @Lolonois

                                        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:
                                        IMG_4087 - Moyenne.jpeg

                                        IMG_4088 - Moyenne.jpeg

                                        IMG_4089 - Moyenne.jpeg

                                        1 Reply Last reply Reply Quote 0
                                        • LolonoisL
                                          Lolonois
                                          last edited by

                                          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 from evtest 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.

                                          J 1 Reply Last reply Reply Quote 0
                                          • J
                                            Jimmy14 @Lolonois
                                            last edited by Jimmy14

                                            @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?

                                            J 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.