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

    Need to make two buttons work. (Preliminary research for Retro Pi 3 Model B project)

    Scheduled Pinned Locked Moved Help and Support
    helpgpiobuttons
    8 Posts 2 Posters 862 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.
    • N
      Nite Shadow
      last edited by

      Hi! I've been doing some research on the raspberry Pi, so that I can install one in a Super Famicom shell that I have on hand and use it for games.
      I'm still waiting for the board to arrive. I have encountered a possible problem in something I would like to do with it.
      In the Super Famicom shell, I have places two micro switches at Eject, and Reset. The buttons confirmed to be functioning as they should.
      I would like to use these buttons in place of the hotkey commands to return to the game menu, and to reset the currently running game.

      I have found that the GPIO pins might be used for this purpose, however doing google searches has turned up a mass of inconsistent data.
      So, after searching for better part of a month, I have finally decided to ask: How can I achieve this? or if possible, is there something pre-configured that I can just install to make this happen?

      1 Reply Last reply Reply Quote 0
      • N
        Nite Shadow
        last edited by

        Sorry for the bump, but:
        Am I to understand that what I am trying to achieve is not possible?

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

          @nite-shadow It can work like you want. You can use GPIO . . . one pin for each button, and the other terminals for each button go to a common ground pin. Then, you load up software like Adafruit's Retrogame or mholgatem's GPIOneer or others which basically run a keyboard driver that takes GPIO inputs and translates them into keypresses.

          THEN, you go into RetroArch or a given emulator config and map the keys you are using to the desired function.

          I am doing something similar on my system, only instead of exit/reset, I have my buttons increasing or decreasing volume.

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

          1 Reply Last reply Reply Quote 0
          • N
            Nite Shadow
            last edited by

            That sounds pretty simple actually. Anything special I need to know about making those work?
            There is also a concern regarding the GPIO layout on my Pi. I have found several different pinout diagram regarding it, and even a few reports of disastrous results from incorrectly connecting something, due to following an incorrect pinout diagram. What would be the correct one for the unit I'm getting?
            (Really, did I actually call it a retro pi?, I meant Raspberry Pi 3 Model B)

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

              @nite-shadow Good questions. Everyone has their own design ideas, and it may help to check here about using Retrogame for mapping the keys and connecting to GPIO and checking out their own support forum. It looks like they encourage questions about the software and about your project ideas, so maybe they have good answers. I happen to use GPIOneer for my volume buttons, and the developer mholgatem is very nice and responsive to questions as well.

              Finally, you might want to check this third option called mkarcade which includes documentation about the pins used—handy details that are worth looking into no matter what software option you choose.

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

              1 Reply Last reply Reply Quote 1
              • N
                Nite Shadow
                last edited by

                Excellent!
                That seems to cover about everything. I just need to wait for my board to arrive and I can get started.
                Thank you so much Caver01!

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

                  @nite-shadow No prob. Hey, take some pictures as you go and share your build project in the other section. Folks love to see what everyone is building.

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

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nite Shadow
                    last edited by

                    Sure thing!

                    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.