🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    CoreS3 with 7 external buttons

    Cores
    2
    9
    3.7k
    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.
    • Z
      zeeman
      last edited by

      Hi all - I'm looking to put a CoreS3 into an enclosure where the touchscreen can't be used. The enclosure would also have 7 momentary buttons connected to the CoreS3.

      I'm looking for advice on how I could run 7 buttons connected to the CoreS3.

      I'm open to adding modules and units. I've ordered the single and dual button units as well as the hubs, but have not received them yet. I also have a set of generic 4-pin momentary buttons and I've seen articles whereby the buttons can be wired in series with resistors between each button and detect the voltage.

      I don't need to detect simultaneous button presses or multiple button presses.

      Any advice would be appreciated!

      As a side note I'll also be connecting a rotary encoder to the CoreS3, though this isn't related to the button functionality.

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        There are many, many ways to add more buttons

        If you want "Arcade" style buttons you could use an IO unit or you could connect them all to the Analogue port using a resistor ladder like in this link https://www.google.com/url?sa=i&url=https%3A%2F%2Frayshobby.net%2Fwordpress%2Fmultiple-button-inputs-using-arduino-analog-pin%2F&psig=AOvVaw0NJ7Yw6Q3TqH9WtaJm5uWe&ust=1703099208762000&source=images&cd=vfe&opi=89978449&ved=0CBIQjRxqFwoTCNDijZCZnIMDFQAAAAAdAAAAABAD
        alt text

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • Z
          zeeman
          last edited by

          Thanks for your reply and thoughts. The resistor ladder is an idea and the one I had read about. I'll give that one a go.

          For the arcade style buttons, can I ask if you were suggesting something different to the M5stack units available?

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            If you are going for M5Stack button then you need PortB hubs.
            https://shop.m5stack.com/products/i-o-hub-1-to-6-expansion-unit-stm32f0

            To be honest I wasn't thinking of M5Stack buttons and forgot about them.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • Z
              zeeman
              last edited by zeeman

              Great, thank you! I have purchased that and should get them in the next few days. Either way, your help has been great and I'm looking forward to getting it all setup.

              ajb2k3A 1 Reply Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3 @zeeman
                last edited by

                @zeeman don’t hesitate to ask if you have any problems

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                1 Reply Last reply Reply Quote 0
                • Z
                  zeeman
                  last edited by

                  Just an update that the PbHub worked a treat, I plugged 3 of the dual buttons in and two single key buttons, and by including the library in the GitHub repository I was able to get the digital value for all 8 buttons simultaneously.

                  Thanks again for your help.

                  1 Reply Last reply Reply Quote 1
                  • ajb2k3A
                    ajb2k3
                    last edited by

                    Glad to hear, Why not try writing up the complete project when finished and posting it on Hackster.io

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 0
                    • Z
                      zeeman
                      last edited by

                      I'll look into it as that's something I'd like to do, thanks!

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