• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

[SOLVED] Audio gestion with 2 physical buttons on GPIO

Scheduled Pinned Locked Moved Help and Support
retropiealsamixervolumebuttonsgpio
7 Posts 4 Posters 1.1k 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.
  • G
    Goldren
    last edited by Goldren 19 Sept 2018, 09:49

    The subject are already open, but it's not what I search.
    or I don't understand the answers (possibly)

    Hello, (sorry i'm french and i've a basic level in english, please when you reply to this post, simplified your english, thanks)

    I've a project in progress, and a part of this project consist to up and down the volume of retropie (alsamixer).
    I see the parameter to up/down volume in the settings, but i want to do this in game with 2 physical bouttons (or more) one for up and the other for down.

    Sure, I want to use the GPIO to do this gestion.

    First question : it's possible ?
    Second question : What I must do to realize that ?

    Thank you for your answers.

    Raspberry Pi : 2 B+
    RetroPie Version Used : 4.1 EDIT : 4.4 (sorry)
    (thanking you and excusing me for my approximate English.)

    M 1 Reply Last reply 19 Sept 2018, 16:25 Reply Quote 0
    • M
      mitu Global Moderator @Goldren
      last edited by 19 Sept 2018, 16:25

      @goldren said in Audio gestion with 2 physical buttons on GPIO:

      First question : it's possible ?

      I think so.

      Second question : What I must do to realize that ?

      You must learn to read the GPIO inputs and run commands for volume up/down to react to them, all with a script that runs all the time on the Pi.
      Here is a similar project, albeit with a different mechanism to send the signals to the GPIO, with a script all set-up and instructions on how to read the GPIO signals and to modify the volume.
      I'm sure you can find lots of similar projects, but you'll have to learn to adapt them to your project, which is not so difficult.
      Btw, your RetroPie version is quite old, you might consider upgrading at some point for the new features and support.

      1 Reply Last reply Reply Quote 1
      • G
        Goldren
        last edited by Goldren 19 Sept 2018, 18:09

        Thank for your answer !

        I missed to explain that, I know how GPIO work and programmed is not a problem for me, now, I want to know the variable who have to operate to change volume, really just that :) !

        thanks for the link ! And too for the upgrade of my retropie, in fact, it's just a miskate from me, i've actualy the 4.4 ! :)

        1 Reply Last reply Reply Quote 0
        • C
          cyperghost
          last edited by 19 Sept 2018, 19:38

          https://unix.stackexchange.com/questions/21089/how-to-use-command-line-to-change-volume

          Higher volume:
          amixer set Master 3%+

          Lower volume:
          amixer set Master 3%-

          Mute toggle:
          amixer set Master toggle

          G 1 Reply Last reply 20 Sept 2018, 07:24 Reply Quote 1
          • G
            Goldren @cyperghost
            last edited by 20 Sept 2018, 07:24

            @cyperghost You're my hero ! thanks for that ! I will do a post with my entire project soon ! thanks !

            1 Reply Last reply Reply Quote 0
            • O
              ooskay
              last edited by 1 Feb 2020, 17:21

              Hi Goldren, have you find a solution to assing GPIO buttons to the below commands? I require same function for my setup. Thanks..

              M 1 Reply Last reply 1 Feb 2020, 17:54 Reply Quote 0
              • M
                mitu Global Moderator @ooskay
                last edited by 1 Feb 2020, 17:54

                @ooskay Instead of bumping year(s) old topics, why don't you open a new topic, explaining what's your setup and what exactly do you want to do.

                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.

                  This community forum collects and processes your personal information.
                  consent.not_received