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

    GPIO 6 button controller

    Scheduled Pinned Locked Moved Help and Support
    gpiocontrollergameboy
    24 Posts 3 Posters 6.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.
    • spruce_m00seS
      spruce_m00se
      last edited by

      Hi,
      im reading this:
      https://github.com/RetroPie/RetroPie-Setup/wiki/GPIO-Modules
      Does anyone know if its possible to set up a controller with a dpad and six buttons on GPIO?
      i have built a 3d printed gameboy and want to wire up the controller, having hacked it, the wires are too small to solder back onto the original usb controller chip, so GPIO seems my only option.

      Any help?

      caver01C 1 Reply Last reply Reply Quote 0
      • caver01C
        caver01 @spruce_m00se
        last edited by

        @spruce_m00se You might consider loading Adafruit's RetroGame. Here is a link to their sample 6-button configuration, but explore all of it, as they have other configs for Pi Zero and others. It is a slick piece of software that sets up a virtual keyboard for inputs via GPIO.

        I am also a fan of mholgatem's GPIOneer software. It is similar to RetroGame, but it has a web interface. Also, mholgatem is actively developing it.

        My 4-player cocktail style cabinet built as a custom "roadcase"

        1 Reply Last reply Reply Quote 0
        • obsidianspiderO
          obsidianspider
          last edited by

          Retrogame works really well for me.

          📷 @obsidianspider

          1 Reply Last reply Reply Quote 0
          • spruce_m00seS
            spruce_m00se
            last edited by

            this looks like what I need,
            is there a decent tutorial on how to use it? I guess I will ask Mr google

            1 Reply Last reply Reply Quote 0
            • spruce_m00seS
              spruce_m00se
              last edited by

              This worked perfectly straight away,,,, absolutely great, thanks for the heads up on this one.

              1 Reply Last reply Reply Quote 1
              • spruce_m00seS
                spruce_m00se
                last edited by

                does anyone know how to turn off retrogame again? I have it on a system but I need to have a full keyboard on that system in order to connect to wifi and ssh .

                caver01C 1 Reply Last reply Reply Quote 0
                • caver01C
                  caver01 @spruce_m00se
                  last edited by

                  @spruce_m00se I think retrogame drops an entry into /etc/rc.local so that it runs at boot.

                  My 4-player cocktail style cabinet built as a custom "roadcase"

                  caver01C 1 Reply Last reply Reply Quote 0
                  • caver01C
                    caver01 @caver01
                    last edited by

                    @caver01 or maybe in /home/pi/.profile

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    1 Reply Last reply Reply Quote 0
                    • spruce_m00seS
                      spruce_m00se
                      last edited by

                      Are these files that can be accessed from the SD card? if not then I cant get to them due to a lack of keyboard :(

                      caver01C 1 Reply Last reply Reply Quote 0
                      • caver01C
                        caver01 @spruce_m00se
                        last edited by

                        @spruce_m00se These are not in the boot directory/partition, so not as easy editing the card on a PC/Mac. You could edit it via network (SSH) if your Pi networked. Of course, you would have to make sure SSH is enabled if it is built from a newer image.

                        My 4-player cocktail style cabinet built as a custom "roadcase"

                        1 Reply Last reply Reply Quote 0
                        • spruce_m00seS
                          spruce_m00se
                          last edited by

                          no such luck, it is a pi zero, wifi isnt configured, neither is ssh.
                          DOH!
                          maybe a new image is the quickest way to fix this issue.

                          caver01C 1 Reply Last reply Reply Quote 0
                          • caver01C
                            caver01 @spruce_m00se
                            last edited by

                            @spruce_m00se Well, I would think the easy way is to simply plug in a keyboard.

                            My 4-player cocktail style cabinet built as a custom "roadcase"

                            1 Reply Last reply Reply Quote 0
                            • spruce_m00seS
                              spruce_m00se
                              last edited by

                              you would think that hey, but it doesnt work. I guess only one keyboard is recognised at a time and that is the emulated one ?

                              caver01C 1 Reply Last reply Reply Quote 0
                              • caver01C
                                caver01 @spruce_m00se
                                last edited by

                                @spruce_m00se Wait, What? That's odd. So if you boot up the P0 with a USB keyboard connected, while RetroGame is loaded the USB keyboard doesn't work? That seems very odd. It seems like you should be able to use your GPIO connected buttons to navigate out of Emulation Station to a command prompt and start typing on the USB keyboard. Otherwise, once you have it loaded, how do you ever make changes or corrections to the retrogame config?

                                My 4-player cocktail style cabinet built as a custom "roadcase"

                                spruce_m00seS 1 Reply Last reply Reply Quote 0
                                • spruce_m00seS
                                  spruce_m00se @caver01
                                  last edited by

                                  @caver01
                                  let me test that, I havent tried coming out of ES, I have only tried the usb keyboard in the retropie menus, I realised that I was having problems when I was trying to raise the volume in the mixer, I couldnt press esc to exit.....

                                  caver01C 1 Reply Last reply Reply Quote 0
                                  • caver01C
                                    caver01 @spruce_m00se
                                    last edited by

                                    @spruce_m00se I have seen multiple keyboard controllers get "confused" before and one stops working. Restarting always clears it up.

                                    My 4-player cocktail style cabinet built as a custom "roadcase"

                                    spruce_m00seS 1 Reply Last reply Reply Quote 0
                                    • spruce_m00seS
                                      spruce_m00se @caver01
                                      last edited by

                                      @caver01 well this hasnt cleared up after restarting as I have restarted at elast 5 times whilst trying to sort it, I will try outside of ES and see waht happens,

                                      1 Reply Last reply Reply Quote 0
                                      • spruce_m00seS
                                        spruce_m00se
                                        last edited by

                                        ok, so i exited ES to the CLI, and the USB keyboard doesnt work either. The GPIO "keyboard" registers the correct presses in the CLI, but USB is as though its not conencted.

                                        caver01C 1 Reply Last reply Reply Quote 0
                                        • caver01C
                                          caver01 @spruce_m00se
                                          last edited by

                                          @spruce_m00se Bad keyboard connection? I still can't believe that loading retrogame breaks additional keyboard functionality. I don't use retrogame--I am using GPIOneer for my GPIO admin buttons which definitely does not have this problem, but I wonder if someone who does use Retrogame could chime in here and confirm if their experience is the same or different.

                                          My 4-player cocktail style cabinet built as a custom "roadcase"

                                          spruce_m00seS 1 Reply Last reply Reply Quote 0
                                          • spruce_m00seS
                                            spruce_m00se @caver01
                                            last edited by

                                            @caver01 Im going to check my usb connections onto the pi0.
                                            they are hard soldered, they should be fine, but I put a fresh instal on a new sd card today and it didnt recognise any gamepads, although that wouldnt make much sense as I am using a usb sound card on the same non powered usb hub and it is working fine, acually its a non powered hub but being powered directly from the 5v power supply, not draining the pi.
                                            so yeh, the keyboard works on other devices but looks like not on the pi, and the usb sound card works well on the pi. hmmmmm wifi also worked in the past,

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