Recalbox Forum

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

    GPIO rotary volume

    GamePad/GPIO/USB encoder
    gpio rotary volume
    6
    74
    32692
    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 @dh04000 last edited by

      @dh04000 indeed, much easier. Can't say if it's python 3 or not, but it looks rather easy to setup

      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
      • dh04000
        dh04000 last edited by

        Is there any hope of a gpio volume by button or rotary encoder in the future, or should I start working on a new plan for my arcade box? Do you know if usb volume controllers work on recalbox?

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

          It's hard to tell. We just lack devices to test. Almost everything in recalbox is ready to handle it, except the gpio handling

          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é

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

            @subs said in GPIO rotary volume:

            It's hard to tell. We just lack devices to test. Almost everything in recalbox is ready to handle it, except the gpio handling

            Lacking devices to test, does that mean that you lack a rotary encoder to test? How much to the recalbox paypal would solve that? There's an issue withe the gpio handling? I thought recalbox could read gpio events already?

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

              @dh04000 we don't have any rotary button such as yours 😉 we do handle gpio, hopefully lol

              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é

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

                @subs said in GPIO rotary volume:

                @dh04000 we don't have any rotary button such as yours 😉 we do handle gpio, hopefully lol

                Post a link to the cheapest amazon listing for a compatible rotary encoder with free shipping in France (do you have Amazon PRIME?). I'll put the listing money in the Recalbox paypal after my next pay cycle.

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

                  It's not a question of price, but time (wire, code, test), finding something that fits the needs, being able to make a description of how the button works so that anyone can find a similar rortary button.

                  Let's take a shortcut : does it work like this

                  this

                  If so, that's as we would expect it and it is easy.

                  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é

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

                    @subs said in GPIO rotary volume:

                    It's not a question of price, but time (wire, code, test), finding something that fits the needs, being able to make a description of how the button works so that anyone can find a similar rortary button.

                    Let's take a shortcut : does it work like this

                    this

                    If so, that's as we would expect it and it is easy.

                    I offered money because it is what I can offer Recalbox. I can't code, so the only things I can offer is time, and money. Time is me finding this and trying to talk about a feature that users (like me) might enjoy to have. I'd be willing to test it as well, tell me when and I'll purchase myself a rotary encoder. Money being to purchase the parts needed to allow you and others to attempt to implement it. If I could code, I would do it myself and contribute the code, but I can't.

                    Anyhoo, the github code matches an Adafruit rotary encoder, and from what I can gleam from the data sheet (https://cdn-shop.adafruit.com/datasheets/pec11.pdf), that image you posted matches the functionality, where the button is a simple on/off mechanism, and the left and right turns are a series of A or B connections to the common ground (middle post), depending on which direction is turned.

                    Seems to be what you expect.

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

                      Well @supernature2k can handle this, just leave him some time. But it should work one way or another if it's just a pair of switches

                      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
                      • acris
                        acris last edited by

                        Hello @dh04000
                        look this script : https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1
                        may be you can create same for recalbox .

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

                          NECRO'ing because there was an update on this rotary script by the author.

                          One of the author's said," the only things that need to be adjusted in this to make it python 2 compatible is change line #1 from: #!/usr/bin/env python3 to: #!/usr/bin/env python2, and change line #25 from from queue import Queue to from multiprocessing import Queue".

                          Ok, simple enough, ha!

                          Does recalbox run system.d and allow scripts to be started at start up?

                          Thanks.

                          Substring 1 Reply Last reply Reply Quote 0
                          • acris
                            acris last edited by

                            @dh04000
                            like this ? https://github.com/recalbox/recalbox-os/wiki/Add-your-own-startup-script-(EN)

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

                              @dh04000 I finally bought some rotary encoders, but had no time yet to work on that tbh

                              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
                              • dh04000
                                dh04000 last edited by

                                The next time the raspberry pi zero-w is available on adafruit, I'm buying and the rotary encoder suggested on the scripts githib page. I'll test it when I get it and report back.

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

                                  @Substring @acris

                                  Ordered my rotary encoder! 🙂

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

                                    Rotary encoder received. Will try it out this weekend with the python script + author's modifications provided by the github page.

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

                                      @dh04000 sadly i'll be off on holidays till 16th of April, so you may feel drown in a void if you're facing problems ...

                                      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é

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

                                        @Substring I always feel like I'm drowning in the void. I'm a research scientist in real life. Poking holes in the darkness to reveal the light is what I do. 😛

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

                                          @dh04000 well hopefully the void shouldn't turn to a black hole neither, you may just lack a few changes required in the python scripts, but it should work.

                                          One important thing i'm thinking of is the setting of the bounce time if the scripts are using the wiringPi library. The idea (wiringPi or not in fact) is to let a delay between 2 "clicks".

                                          But I'm pretty confident, it should work.

                                          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
                                          • dh04000
                                            dh04000 last edited by

                                            I tried following the guide here (https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L1), but recalbox's file system seems different to retropie's. Also, does recalbox have systemd? Here's my terminal output following the guide, so you see how I failed.

                                            # mkdir ~/bin

                                            # echo $PATH

                                            /bin:/sbin:/usr/bin:/usr/sbin

                                            -sh: /bin:/sbin:/usr/bin:/usr/sbin: No such file or directory

                                            # nano ~/bin/monitor-volume

                                            # chmod +x ~/bin/monitor-volume

                                            # nano ~/monitor-volume.service

                                            # monitor-volume

                                            -sh: monitor-volume: command not found

                                            -sh: -sh:: command not found

                                            # nano ~/monitor-volume.service

                                            # chmod +x ~/monitor-volume.service

                                            mv ~/monitor-volume.service /etc/systemd/system

                                            mv: can't rename '/recalbox/share/system/monitor-volume.service': No such file or directory

                                            Maybe you can figure out whats wrong @Substring ? I'm sure its trivial.

                                            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