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

    RPI4+GPIO acting strange

    Scheduled Pinned Locked Moved Help and Support
    rpi4gpiomkarcadejoysticjstest
    10 Posts 4 Posters 1.3k 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.
    • C
      coda
      last edited by

      Hi everyone,

      Warning: Maybe newbie question here ! :)

      I'm trying to connect arcade joystick and buttons to the GPIO of my Pi 4 and make them work with retropie + mk_arcade_joystick_rpi.

      I've followed every tutorial and doc I could find but with no luck right now.
      So I finally tried disconnecting everything from the GPIO pins and discovered that jstest still believes some buttons are pressed! Is it normal ?

      pi@retropie:~ $ jstest /dev/input/js0
      Driver version is 2.1.0.
      Joystick (GPIO Controller 1) has 2 axes (X, Y)
      and 12 buttons (BtnA, BtnB, BtnC, BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart).
      Testing ... (interrupt to exit)
      Axes:  0:     0  1:     0 Buttons:  0:on   1:on   2:off  3:on   4:on   5:off  6:on   7:on   8:off  9:off 10:on  11:on
      
      ledowL 1 Reply Last reply Reply Quote 0
      • ledowL
        ledow @coda
        last edited by

        Not normal. I would suggest either something is shorting those button's pins or similar.

        1 Reply Last reply Reply Quote 0
        • C
          coda
          last edited by

          Tried removing mk_arcade_joystick_rpi and install adafruit retrogame instead and now eveything works great.

          My guess is that mk_arcade_joystick_rpi is not compatible with Pi4 yet.
          Did any one manage to make it work?

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

            @coda said in RPI4+GPIO acting strange:

            My guess is that mk_arcade_joystick_rpi is not compatible with Pi4 yet.
            Did any one manage to make it work?

            It should be, the GPIO wiring is similar to previous Pi3 model. The RetroGame AFAIR emulates a keyboard, not a gamepad, so it's a bit different.

            1 Reply Last reply Reply Quote 0
            • C
              coda
              last edited by

              Finally installed GPIONext which works great and allows me to setup two controllers.
              I still did not manage to make mkarcadejoystick work though but maybe I missed something.

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

                @coda said in RPI4+GPIO acting strange:

                I still did not manage to make mkarcadejoystick work though but maybe I missed something.

                Did you install it from the RetroPie-Setup drivers' section ?

                C 1 Reply Last reply Reply Quote 0
                • C
                  coda @mitu
                  last edited by

                  Yes. And with no additional changes the jstest command was giving me the feedback I mentioned in my original message

                  1 Reply Last reply Reply Quote 0
                  • G
                    gogangdong
                    last edited by gogangdong

                    I also wired arcade joysticks and buttons using GPIO, and installed and tested GPIO in retropie setup using retropie development build 4.5.13, but only the top direction of joystick, B button and .Y button worked.Other buttons did not work.It looks like development is still needed.

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

                      @gogangdong said in RPI4+GPIO acting strange:

                      It looks like development is still needed.

                      Unfortunately the upstream project is not active anymore. The RetroPie 'version' of the driver just patches around the compatibilities with newer kernels and the newer Pi4, but we don't have a device like this to test.

                      Can you give more details about your device and setup ? What buttons do you have and what parameters you used for the module ?

                      1 Reply Last reply Reply Quote 0
                      • G
                        gogangdong
                        last edited by gogangdong

                        @gogangdong said in RPI4+GPIO acting strange:

                        4.5.13

                        The hardware was wired to the GPIO for the wiring of the mk_arcade_joystick_rpi and the mountains and joysticks, Sanwabuttons a,b,x,y,l,r,start, and select buttons to fit the GPIO and install 4.5.13 (https://files.retropie.org.uk/images/weekly/).B,Y,Other buttons on joystick did not work.
                        mkarcadejoyystick 0.1.7 version(https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/mkarcadejoystick.shSetup/blob/master/scriptmodules/supplementary/mkarcadejoystick.sh

                        In the input setting of the retropie, say you found the GPIO controller and enter the keystroke (if you press Y, GPIO).They say they found the controller and enter the keystrokes. The joystick and other buttons do not work and the key setting sets the joystick to the top and B buttons, and the other buttons do not work.)

                        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.