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

    MCP23017 and Retropie, some problem appears

    Scheduled Pinned Locked Moved Help and Support
    mcp23017gpiocontrollerrecalbox
    40 Posts 5 Posters 7.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.
    • S
      StoneSet
      last edited by

      I also get this erros when i try to run :
      sudo dpkg -i mk-arcade-joystick-rpi-0.1.4.deb

      (Reading database ... 89823 files and directories currently installed.)
      Preparing to unpack mk-arcade-joystick-rpi-0.1.4.deb ...


      Deleting module version: 0.1.4
      completely from the DKMS tree.

      Done.
      Unpacking mk-arcade-joystick-rpi-dkms (0.1.4) over (0.1.4) ...
      Setting up mk-arcade-joystick-rpi-dkms (0.1.4) ...
      Loading new mk_arcade_joystick_rpi-0.1.4 DKMS files...
      First Installation: checking all kernels...
      dpkg: warning: version '-' has bad syntax: version number does not start with digit
      It is likely that 4.9.77+ belongs to a chroot's host
      Building for architecture armv6l
      Module build for the currently running kernel was skipped since the
      kernel source for this kernel does not seem to be installed.

      Best regards,
      http://stoneset.github.io

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

        @stoneset Are you using Berryboot or the RetroPie image ? How was your system installed ?

        1 Reply Last reply Reply Quote 0
        • S
          StoneSet
          last edited by

          I used the retropie image, i burn the img with etcher

          Best regards,
          http://stoneset.github.io

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

            @stoneset The error comes from:

            Module build for the currently running kernel was skipped since the
            kernel source for this kernel does not seem to be installed.

            However, you seem to be using an older version of the RetroPie-Setup script. Update the script and the underlying OS packages, then try again.

            1 Reply Last reply Reply Quote 0
            • S
              StoneSet
              last edited by

              Okay i updated the script, but now I get a kernel error, I do not have the right update

              Best regards,
              http://stoneset.github.io

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

                @stoneset Did you update also the OS packages - including the kernel ? If so, then reboot so that the new kernel is picked up.

                1 Reply Last reply Reply Quote 0
                • S
                  StoneSet
                  last edited by

                  I don't know, I will try

                  Best regards,
                  http://stoneset.github.io

                  1 Reply Last reply Reply Quote 0
                  • S
                    StoneSet
                    last edited by StoneSet

                    Okay !! I successefully installed the driver !

                    But now i have got another problem :
                    When i run "jstest /dev/input/js0"

                    Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off

                    Only :

                    • Buttons 6 : on
                    • Buttons 8 : on

                    I also try to add a 10kohm to the button
                    (This shematics : alt text without the led

                    And I run properly everythin !
                    link text

                    I think, the map isn't correct with my configuration :
                    sudo modprobe mk_arcade_joystick_rpi map=1,0x20

                    Any suggestion ?

                    Best regards,
                    http://stoneset.github.io

                    rbakerR simonsterS 2 Replies Last reply Reply Quote 0
                    • rbakerR
                      rbaker @StoneSet
                      last edited by

                      @stoneset On a breadboard like that above, the power rails do not go all the way along, only half way.

                      1 Reply Last reply Reply Quote 0
                      • S
                        StoneSet
                        last edited by

                        So ?

                        Best regards,
                        http://stoneset.github.io

                        rbakerR 1 Reply Last reply Reply Quote 0
                        • rbakerR
                          rbaker @StoneSet
                          last edited by

                          @stoneset There are components on both sides of the gap - if there is a gap - on your board.

                          1 Reply Last reply Reply Quote 0
                          • simonsterS
                            simonster @StoneSet
                            last edited by simonster

                            @stoneset

                            Use sudo i2cdetect -y 1 to get the value for the map figure.

                            What is the resistor connected from 5v to pin 28 for, are you attempting to pull it high? According to the datasheet the chip does this automatically. Also you appear to have the led and resistor connected to pin 21 (up) and the reset pin connected to 5v.

                            The pinout is as in this image: https://raw.githubusercontent.com/recalbox/mk_arcade_joystick_rpi/master/wiki/images/mk_joystick_arcade_mcp23017.png

                            1 Reply Last reply Reply Quote 0
                            • S
                              StoneSet
                              last edited by

                              Hi,
                              This is my schematics :
                              Where i have to put the resistor ?

                              alt text

                              thanks a lot !

                              Best regards,
                              http://stoneset.github.io

                              1 Reply Last reply Reply Quote 0
                              • S
                                StoneSet
                                last edited by StoneSet

                                Okay good news, i have found the problem :

                                I read this "It uses internal pull-ups of RPi and of MCP23017, so all switches must be directly connected to its corresponding GPIO and to the ground."

                                So no resistor needed

                                And, the problem is'nt hardware, but software !

                                Some pictures :

                                0_1517298492064_001c3934-40c2-4280-86c4-158a9b1ed8bf-image.png

                                I think the problem is when i do :
                                "sudo modprobe mk_arcade_joystick_rpi map=1,0x20"

                                The driver does not work with the mcp23017 and continues to work on the gpio rpi

                                thanks,
                                If some one can help me

                                Best regards,
                                http://stoneset.github.io

                                simonsterS 1 Reply Last reply Reply Quote 0
                                • simonsterS
                                  simonster @StoneSet
                                  last edited by simonster

                                  @stoneset

                                  @stoneset said in [MCP23017 and Retropie, some problem appears]

                                  I think the problem is when i do :
                                  "sudo modprobe mk_arcade_joystick_rpi map=1,0x20"

                                  The driver does not work with the mcp23017 and continues to work on the gpio rpi

                                  thanks,
                                  If some one can help me

                                  This command will make js0 map to GPIO pins as per normal mk_arcade_joystick and js1 map to the mcp23017.

                                  You need to do the following to map it as js0:

                                  sudo modprobe mk_arcade_joystick_rpi map=0x20

                                  Why do you have the reset pin on the MCP23017 connected to 3.3V, I've never seen this done.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    StoneSet
                                    last edited by StoneSet

                                    Hi,

                                    Thanks for your reply, finally it work !!
                                    Thanks a lot everyone !

                                    (I will write a manual, "how to use MCP23017 on RetroPie")

                                    Best regards,
                                    http://stoneset.github.io

                                    1 Reply Last reply Reply Quote 0
                                    • simonsterS
                                      simonster
                                      last edited by

                                      If you want to attach further controllers using addition mcp23017 chips, to can pair all the wires to the Pi and just change it so on of the A0,A1 or A2 leads are pulled high. Then use i2cdetect to find its value and load it using map=0x20, 0x22 (or whatever the address is) and it will connect as P2

                                      I've had 4 players connected like this. Did you leave the reset pin attached to 3.3v? I've just tried on mine and nothing works when I pull that pin high.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        StoneSet
                                        last edited by

                                        Hi,
                                        Thanks for you reply,

                                        No i didn't leave the 3.3V reset pin on the MCp23017. It work perfectly !

                                        Best regards,
                                        http://stoneset.github.io

                                        1 Reply Last reply Reply Quote 0
                                        • N
                                          nickstr138
                                          last edited by

                                          Hi @StoneSet

                                          Did you happen to write the manual "how to use MCP23017 on RetroPie?"

                                          I appear to be stuck in the same place you were.

                                          Thank you!!

                                          simonsterS 1 Reply Last reply Reply Quote 0
                                          • simonsterS
                                            simonster @nickstr138
                                            last edited by

                                            @nickstr138

                                            I keep trying to write a detailed manual on this stuff, but have been really busy with work of late.

                                            What is the issue you are having?

                                            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.