Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    GPIO joystick and buttons issue

    GamePad/GPIO/USB encoder
    gpio joystick buttons issue
    5
    40
    12385
    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.
    • Substring
      Substring @IvoLourenco last edited by

      @ivolourenco has every single button returned a different event ?
      To share what you did, juste select the text in putty (it's automatically copied, that's a linux habbit) and paste it here between triple back quotes

      Former dev - Please reply with @substring so that i am notified when you answer me
      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

      1 Reply Last reply Reply Quote 0
      • IvoLourenco
        IvoLourenco last edited by

        @Substring output from the evtest below.
        Sequence was: js up; js down; js left; js right; B; A; TR; TL; X; Y; Start; Select.

        So i would imagine that all the setup is ok. However, within the Recalbox is not detected.
        I have a daisy chain ground that runs on all the buttons and is connected to the GPIO 6 any potential issue with that?

        """No device specified, trying to scan all of /dev/input/event*
        Available devices:
        /dev/input/event0: NOVATEK USB Keyboard
        /dev/input/event1: NOVATEK USB Keyboard
        /dev/input/event2: GPIO Controller 1
        /dev/input/event3: GPIO Controller 2
        Select the device event number [0-3]: 2
        Input driver version is 1.0.1
        Input device ID: bus 0x15 vendor 0x1 product 0x1 version 0x100
        Input device name: "GPIO Controller 1"
        Supported events:
        Event type 0 (EV_SYN)
        Event type 1 (EV_KEY)
        Event code 304 (BTN_SOUTH)
        Event code 305 (BTN_EAST)
        Event code 307 (BTN_NORTH)
        Event code 308 (BTN_WEST)
        Event code 310 (BTN_TL)
        Event code 311 (BTN_TR)
        Event code 314 (BTN_SELECT)
        Event code 315 (BTN_START)
        Event code 316 (BTN_MODE)
        Event type 3 (EV_ABS)
        Event code 0 (ABS_X)
        Value 0
        Min -1
        Max 1
        Event code 1 (ABS_Y)
        Value 0
        Min -1
        Max 1
        Properties:
        Testing ... (interrupt to exit)
        Event: time 315536585.570709, type 3 (EV_ABS), code 1 (ABS_Y), value 1
        Event: time 315536585.570709, -------------- SYN_REPORT ------------
        Event: time 315536585.780727, type 3 (EV_ABS), code 1 (ABS_Y), value 0
        Event: time 315536585.780727, -------------- SYN_REPORT ------------
        Event: time 315536587.760702, type 3 (EV_ABS), code 1 (ABS_Y), value -1
        Event: time 315536587.760702, -------------- SYN_REPORT ------------
        Event: time 315536587.970709, type 3 (EV_ABS), code 1 (ABS_Y), value 0
        Event: time 315536587.970709, -------------- SYN_REPORT ------------
        Event: time 315536589.990696, type 3 (EV_ABS), code 0 (ABS_X), value 1
        Event: time 315536589.990696, -------------- SYN_REPORT ------------
        Event: time 315536590.160719, type 3 (EV_ABS), code 0 (ABS_X), value 0
        Event: time 315536590.160719, -------------- SYN_REPORT ------------
        Event: time 315536591.750714, type 3 (EV_ABS), code 0 (ABS_X), value -1
        Event: time 315536591.750714, -------------- SYN_REPORT ------------
        Event: time 315536591.910707, type 3 (EV_ABS), code 0 (ABS_X), value 0
        Event: time 315536591.910707, -------------- SYN_REPORT ------------
        Event: time 315536598.760726, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
        Event: time 315536598.760726, -------------- SYN_REPORT ------------
        Event: time 315536598.930715, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
        Event: time 315536598.930715, -------------- SYN_REPORT ------------
        Event: time 315536603.350710, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
        Event: time 315536603.350710, -------------- SYN_REPORT ------------
        Event: time 315536603.520718, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
        Event: time 315536603.520718, -------------- SYN_REPORT ------------
        Event: time 315536686.300702, type 1 (EV_KEY), code 311 (BTN_TR), value 0
        Event: time 315536686.300702, -------------- SYN_REPORT ------------
        Event: time 315536686.500701, type 1 (EV_KEY), code 311 (BTN_TR), value 1
        Event: time 315536686.500701, -------------- SYN_REPORT ------------
        Event: time 315536692.130701, type 1 (EV_KEY), code 310 (BTN_TL), value 0
        Event: time 315536692.130701, -------------- SYN_REPORT ------------
        Event: time 315536692.330698, type 1 (EV_KEY), code 310 (BTN_TL), value 1
        Event: time 315536692.330698, -------------- SYN_REPORT ------------
        Event: time 315536702.220730, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
        Event: time 315536702.220730, -------------- SYN_REPORT ------------
        Event: time 315536702.430694, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
        Event: time 315536702.430694, -------------- SYN_REPORT ------------
        Event: time 315536709.500750, type 1 (EV_KEY), code 308 (BTN_WEST), value 0
        Event: time 315536709.500750, -------------- SYN_REPORT ------------
        Event: time 315536709.690705, type 1 (EV_KEY), code 308 (BTN_WEST), value 1
        Event: time 315536709.690705, -------------- SYN_REPORT ------------
        Event: time 315536714.390708, type 1 (EV_KEY), code 315 (BTN_START), value 0
        Event: time 315536714.390708, -------------- SYN_REPORT ------------
        Event: time 315536714.570710, type 1 (EV_KEY), code 315 (BTN_START), value 1
        Event: time 315536714.570710, -------------- SYN_REPORT ------------
        Event: time 315536716.760701, type 1 (EV_KEY), code 314 (BTN_SELECT), value 0
        Event: time 315536716.760701, -------------- SYN_REPORT ------------
        Event: time 315536716.940702, type 1 (EV_KEY), code 314 (BTN_SELECT), value 1
        Event: time 315536716.940702, -------------- SYN_REPORT ------------"""

        Substring 1 Reply Last reply Reply Quote 0
        • Substring
          Substring @IvoLourenco last edited by

          @ivolourenco So, each of the buttons are working properly and independantly. The daisy chain is just for the ground, and should link a pin of each switch to the Pi ground.

          You're not supposed to remap the controller in ES, it's configured by default. Try those commands in SSH :

          /etc/init.d/S31emulationstation stop
          cp /recalbox/share_init/system/.emulationstation/es_input.cfg ~/.emulationstation
          /etc/init.d/S31emulationstation start
          

          And try your stick without reconfiguring it for now

          Former dev - Please reply with @substring so that i am notified when you answer me
          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

          1 Reply Last reply Reply Quote 0
          • IvoLourenco
            IvoLourenco last edited by

            @Substring see the outup of those commands:

            """ # /etc/init.d/S31emulationstation stop

            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!

            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
            ERROR - tried to write to log file before it was open! The following won't be logged:
            lvlERROR - tried to write to log file before it was open! The following won't be logged:

            cp /recalbox/share_init/system/.emulatoions

            BusyBox v1.25.1 (2017-10-12 19:45:17 UTC) multi-call binary.

            Usage: cp [OPTIONS] SOURCE... DEST

            Copy SOURCE(s) to DEST

                -a      Same as -dpR
                -R,-r   Recurse
                -d,-P   Preserve symlinks (default if -R)
                -L      Follow all symlinks
                -H      Follow symlinks on command line
                -p      Preserve file attributes if possible
                -f      Overwrite
                -i      Prompt before overwrite
                -l,-s   Create (sym)links
                -u      Copy only newer files
            

            /etc/init.d/S31emulationstation start

            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!

            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
            lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
            lvl0: System "favorites" is missing name, path, extension, or command!
            lo IP Address 127.0.0.1
            eth0 IP Address 169.254.119.52
            curl: (6) Couldn't resolve host 'recaleur-archive-prod.recalbox.com'' """

            Note: The joystick works withing the recalbox. But none the button work still.

            Substring 1 Reply Last reply Reply Quote 0
            • Substring
              Substring @IvoLourenco last edited by

              @ivolourenco said in GPIO joystick and buttons issue:

              cp /recalbox/share_init/system/.emulatoions

              This is not the command I wrote, please read again

              Former dev - Please reply with @substring so that i am notified when you answer me
              Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

              1 Reply Last reply Reply Quote 0
              • IvoLourenco
                IvoLourenco last edited by

                @Substring sorry for that, output below.

                """# /etc/init.d/S31emulationstation stop

                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!

                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
                ERROR - tried to write to log file before it was open! The following won't be logged:
                lvlERROR - tried to write to log file before it was open! The following won't be logged:

                cp /recalbox/share_init/system/.emulations

                BusyBox v1.25.1 (2017-10-12 19:45:17 UTC) multi-call binary.

                Usage: cp [OPTIONS] SOURCE... DEST

                Copy SOURCE(s) to DEST

                    -a      Same as -dpR
                    -R,-r   Recurse
                    -d,-P   Preserve symlinks (default if -R)
                    -L      Follow all symlinks
                    -H      Follow symlinks on command line
                    -p      Preserve file attributes if possible
                    -f      Overwrite
                    -i      Prompt before overwrite
                    -l,-s   Create (sym)links
                    -u      Copy only newer files
                

                /etc/init.d/S31emulationstation start

                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!

                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
                lvl0: Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
                lvl0: System "favorites" is missing name, path, extension, or command!
                lo IP Address 127.0.0.1
                eth0 IP Address 169.254.119.52
                curl: (6) Couldn't resolve host 'recaleur-archive-prod.recalbox.com'"""

                Substring 1 Reply Last reply Reply Quote 0
                • Substring
                  Substring @IvoLourenco last edited by

                  @ivolourenco the cp command is not correctly typed. I tried it on my recalbox and it works.
                  When reporting, please use such `bback quotes, not double quotes

                  Former dev - Please reply with @substring so that i am notified when you answer me
                  Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                  1 Reply Last reply Reply Quote 0
                  • IvoLourenco
                    IvoLourenco last edited by

                    @Substring All buttons responding. Seems incorrectly setup though. Shall I remap them?

                    And what have i done... with the commands you suggested?

                    # lvl0:         Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!
                    lvl0:   Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
                    lvl0:   Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
                    ERROR - tried to write to log file before it was open! The following won't be logged:
                    # cp /recalbox/share_init/system/.emulations/es_input.cfg ~/
                    cp: can't stat '/recalbox/share_init/system/.emulations/es_input.cfg': No such file or directory
                    # cp /recalbox/share_init/system/.emulationstation/es_input.cfg ~/.emulationstation
                    # /etc/init.d/S31emulationstation start
                    # lvl0:         Could not find <gameList> node in gamelist "/recalbox/share/roms/amstradcpc/gamelist.xml"!
                    lvl0:   Could not find <gameList> node in gamelist "/recalbox/share/roms/gba/gamelist.xml"!
                    lvl0:   Could not find <gameList> node in gamelist "/recalbox/share/roms/snes/gamelist.xml"!
                    lvl0:   System "favorites" is missing name, path, extension, or command!
                    lo IP Address 127.0.0.1
                    eth0 IP Address 169.254.119.52
                    curl: (6) Couldn't resolve host 'recaleur-archive-prod.recalbox.com'
                    ==============================================
                    ==============================================
                    
                    
                    Substring 1 Reply Last reply Reply Quote 0
                    • Substring
                      Substring @IvoLourenco last edited by

                      @ivolourenco Incorrectly setup ? If you followed the wiring diagram + buttons layout like :
                      Y X L
                      B A X

                      You shouldn't have to remap. But ok, try remapping now you know how to reset the mapping 😉

                      Former dev - Please reply with @substring so that i am notified when you answer me
                      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                      IvoLourenco 1 Reply Last reply Reply Quote 0
                      • IvoLourenco
                        IvoLourenco @Substring last edited by IvoLourenco

                        @substring going to start drilling the button now! 😄

                        I just noticed that when i push up it goes down... so may be there is a issue on the setup of wiring.

                        However, I did a run on remapping but it still does not recognise after A button 😞

                        Thanks

                        Substring 1 Reply Last reply Reply Quote 0
                        • Substring
                          Substring @IvoLourenco last edited by

                          @ivolourenco can you go to http://recalbox while trying to remap, and make a screenshot of Recalbox when you're stuck at remapping ? You can post it here using the small cloud icon with an arrow, no need to drop it on some website

                          Former dev - Please reply with @substring so that i am notified when you answer me
                          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                          IvoLourenco 1 Reply Last reply Reply Quote 0
                          • IvoLourenco
                            IvoLourenco @Substring last edited by

                            @substring so this what i do:

                            1. Main Menu/ Controller Settings

                            2. 2 Gamepads detected (picture below)
                              0_1509474625971_screenshot-1980-01-01T01-03-35-688Z.png

                            3. Press A and start the configuration (joystick configured - Picture below)

                            1_1509474625971_screenshot-1980-01-01T01-04-01-790Z.png

                            1. A button configured as Button 1 and after this none of the others are recognised.
                              2_1509474625971_screenshot-1980-01-01T01-04-29-731Z.png
                            Substring 1 Reply Last reply Reply Quote 0
                            • Substring
                              Substring @IvoLourenco last edited by

                              @ivolourenco so no button would work once A is assigned ? They all work on evtest, i don't get it ... unless you mixed P1 and P2 ...

                              Former dev - Please reply with @substring so that i am notified when you answer me
                              Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                              IvoLourenco 1 Reply Last reply Reply Quote 0
                              • IvoLourenco
                                IvoLourenco @Substring last edited by

                                @substring yes basically none work after A is assigned.

                                How could P1 or P2 affect that? I’m using the GPIO layout proposed within the wiki.

                                Is there a way within evtest to understand that the button is assigned to the correct GPIO pin?

                                Substring 1 Reply Last reply Reply Quote 0
                                • Substring
                                  Substring @IvoLourenco last edited by

                                  @ivolourenco nope evtest just reports which event has been triggered. I still believe that if you're saying the layout is not right, then the wiring is wrong

                                  Former dev - Please reply with @substring so that i am notified when you answer me
                                  Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                                  IvoLourenco 1 Reply Last reply Reply Quote 0
                                  • IvoLourenco
                                    IvoLourenco @Substring last edited by

                                    @substring so I setup my buttons, initiate a game. And then when I have a game loaded at the insert coin (metal slug) or 1 player game (mario) there is no response from any button. I do not have an hot key specific button.

                                    I tried once again to remap my buttons but it does not work as mentioned above.all the wiring is ok as per schematic.

                                    Any thoughts?

                                    Substring 1 Reply Last reply Reply Quote 0
                                    • Substring
                                      Substring @IvoLourenco last edited by

                                      @ivolourenco someone has the same kind of issue but for dreamcast only. Can you make ansupport archive ?

                                      Former dev - Please reply with @substring so that i am notified when you answer me
                                      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                                      IvoLourenco 1 Reply Last reply Reply Quote 0
                                      • IvoLourenco
                                        IvoLourenco @Substring last edited by

                                        @substring after some more testing this occur within Neo Geo, Name, PlayStation. I can play some games of Nintendo not all.

                                        Support Archive is a separate topic? (Sorry for the noob questions)

                                        Substring 1 Reply Last reply Reply Quote 0
                                        • Substring
                                          Substring @IvoLourenco last edited by

                                          @ivolourenco go to http://recalbox/help and make a support archive, post the generated link here

                                          Former dev - Please reply with @substring so that i am notified when you answer me
                                          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                                          1 Reply Last reply Reply Quote 0
                                          • IvoLourenco
                                            IvoLourenco last edited by

                                            @Substring Page not found (404) - Below.

                                            Page not found (404)
                                            Request Method: GET
                                            Request URL: http://recalbox/help
                                            Using the URLconf defined in project.urls, Django tried these URL patterns, in this order:
                                            ^media/(?P<path>.)$
                                            ^500/$
                                            ^404/$
                                            ^static/(?P<path>.
                                            )$
                                            ^ ^$ [name='home']
                                            ^ ^bios/$ [name='bios']
                                            ^ ^bios/upload$ [name='bios-upload']
                                            ^ ^config/$ [name='config']
                                            ^ ^monitoring/$ [name='monitoring']
                                            ^ ^logs/$ [name='logs']
                                            ^ ^systems/$ [name='roms-systems']
                                            ^ ^systems/roms/(?P<system>\w+)/$ [name='roms-list']
                                            ^ ^systems/roms/(?P<system>\w+)/upload/$ [name='roms-upload']
                                            The current URL, help, didn't match any of these.
                                            You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

                                            Substring 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Want to support us ?

                                            93
                                            Online

                                            99.6k
                                            Users

                                            28.1k
                                            Topics

                                            187.1k
                                            Posts

                                            Copyright © 2021 recalbox.com