ask help for multi-input

Dear All:

I have an interesting project but met a small problem. I have 50 buttons to press, and MAX/MSP will produce music according to the button. MY problem is very simple, there are not so many input pins in arduino board. So how should I do to input the signals?

I found an article in arduino's homepage, http://www.arduino.cc/en/Tutorial/LEDDriver http://www.arduino.cc/en/Tutorial/ShiftOut Can I use the same chips as input? Thanks very much!!

Those tutorials are sort of the right idea. What you are doing is "charlieplexing" in reverse more or less.

Try looking at this: http://www.arduino.cc/playground/Main/KeypadTutorial

50 buttons may be a bit tricky. You could do a 5x10 matrix but that would still require 15 pins. I'd probably try first with a smaller matrix (say 5x5) and get the basics to work and then work on using an external demultiplexer to interface the full 50 keys.

Check the palyground for the tutorial on using the 4051 analog multiplexer Ic.

They can also be used to interface many switches. Just remember to use pull up / down resistors, and if needed some kind of switch debouncing technique.

Lady Ada’s tutorial on arduino and switches is a really good place to start if you need to understand pull up / down resistors and debouncing.