Attempting to wire a bunch of buttons


#1

I just found out about keyboard matrices, which are definitely better than using an input for each switch, but I'm wondering how I should wire it, or if it's even possible. Specifically, I don't know which inputs and outputs to use. I get the idea of the rows and columns though.


#2

If you plan to press multiple keys at once (which is often the case for a musical instrument) do not forget deghosting diodes.
http://weirdscience.us/index.php/2017/03/01/ghosting-and-masking/


All the GPIOs on the Axoloti can be used as inputs or as outputs.

Don't forget that you will have to design a scanning code/object for your keyboard.


#3


Will this work? My handwriting isn't the best so if you can't make something out let me know.


Tiar / SmashedTransistors Contributions
#4

Just a suggestion: in my opinion, this forum isn’t the best place to discuss such a generic technique.

If you google ‘DIY keyboard matrix’, you’ll find everything you need to know. If you end up needing info about how to specifically set up Axoloti ports for the necessary inputs and outputs, then this forum makes sense.


#5

That is what I need though


#6

Your sketch looks correct.


#7

@vez , please feel free to ask generic technique questions, if others do not want to respond they don't have to.
:grin:


#8

I wrote that it wasn’t the best place, and only as a suggestion.

Back to switch matrix. Another cheap/simple technique is a 16 port I2C port expander.


#9

Yeah i feel we need convenient 74HC165 objects or something like that. together with the max11300 stuff we could get a basic axoloti shield game going. there's @DrJustice 595 objects but nothing for 165 or other multiplexers...

oh wait what about these? @ricard?


#10

Yeah, connecting up one or a couple of 165's is an easy way to go, if you need a handful of digital inputs. Cheaper than an I2C expander probably and no need to worry about addresses etc.