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 Driver for custom gamepad PCB (driver/plugin)

    Scheduled Pinned Locked Moved Help and Support
    gpio
    7 Posts 3 Posters 2.4k 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.
    • P
      phil123456
      last edited by phil123456

      Hi,

      I want to use the GPIO as is, with buttons and resistor, so I was wondering if there was a retropie plugin for this

      if not how do I write one ?

      thanks

      1 Reply Last reply Reply Quote 0
      • mercifulhackerM
        mercifulhacker
        last edited by

        Do you mean you want to plug in buttons/joystick directly into GPIO pins? Install mk_arcade_joystick_rpi from the retropiesetup.sh->optional packages->drivers (I think...)

        https://github.com/recalbox/mk_arcade_joystick_rpi

        The above link should walk you through how to map and assign GPIO controllers.

        If you give me more info, I can walk you through in more detail.

        P 1 Reply Last reply Reply Quote 0
        • P
          phil123456 @mercifulhacker
          last edited by phil123456

          @mercifulhacker said in GPIO Driver for custom gamepad PCB (driver/plugin):

          mk_arcade_joystick_r

          but I want 4 buttons + directional cross + 2 x (L & R) buttons + start/select

          ok soI guess I could wire the other controller L+R, I am making a hand held device

          markyh444M mercifulhackerM 2 Replies Last reply Reply Quote 0
          • markyh444M
            markyh444 @phil123456
            last edited by

            @phil123456 Directions will also do diagonal as they're axis, so if you go diagonally right up it'll detect that, plus you can tweak it for fewer buttons when setting it up (I've just skim-read the help file and can see that)

            Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
            Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
            Retropie in a PSX - Pi3
            https://markyh444.wordpress.com

            1 Reply Last reply Reply Quote 0
            • mercifulhackerM
              mercifulhacker @phil123456
              last edited by

              @phil123456 Unfortunately, mk_arcade_joystick_rpi only supports 12 buttons per controllers (up, down, left, right, a, b, x, y, L1, R1 start, select for example.)

              so if you're like me and have a controller setup like a PS2 controller, you might have to go without the L2, R2 buttons....

              Or find another way. I haven't had much success aside from the above drivers.

              markyh444M 1 Reply Last reply Reply Quote 0
              • markyh444M
                markyh444 @mercifulhacker
                last edited by

                @mercifulhacker @phil123456 My bad, I only read "4 buttons" and not the shoulder and start/select part... Must've skim-read that too (hard day at work is my excuse).

                Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
                Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
                Retropie in a PSX - Pi3
                https://markyh444.wordpress.com

                1 Reply Last reply Reply Quote 0
                • P
                  phil123456
                  last edited by phil123456

                  it's ok, actualy the fact it's a single c file makes it easier to read
                  and is a good start for me if I want to tweak or so

                  I just found ridiculous to use bluetooth while the controller and the pi are in the same box
                  like most people do (and writing python cos they are too lazy)

                  you gave a great option to dig in :-)

                  1 Reply Last reply Reply Quote 1
                  • 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.