CoreS3 with 7 external buttons
-
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.
-
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
-
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?
-
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-stm32f0To be honest I wasn't thinking of M5Stack buttons and forgot about them.
-
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.
-
@zeeman don’t hesitate to ask if you have any problems
-
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.
-
Glad to hear, Why not try writing up the complete project when finished and posting it on Hackster.io
-
I'll look into it as that's something I'd like to do, thanks!