just a bunch of electrical(electronic) switches
Serial/USB is how to send the data to the PC and a different issue to decoding the switches.
Do you have access to two wires from each switch?
Nothing immediatey springs to mind except 30 shift registers Smiley but there's bound to be some keyboard decoder chips out there.
Maybe there's a simple way to "expand" the io ports in Arduino Cheesy.
..Parallel in - Serial Out shift registers. Lots of them.
Parallel In Serial Out (PISO) shift registers take 8 inputs and shift them serially out from one pin. You can hook as many as you like together, so in your case you would connect 28 of them in a line, pulse one of the Arduino pins 28*8 times while reading another pin and saving a byte every 8 pulses.At the end of this you have 28 bytes in RAM that represent the state of 224 inputs.It's easy to do and will only need 3 pins, but presumably you will be playing music so the only problem is that as a C function it might be too slow if you are expecting an instant response.
Second thought: It is easy to expand the ADC to more lines, as the 6 provided lines are multiplexed anyhow. This needs a quite popular chip as 74HC4051 (1to8-analogue multiplexer). So by using 5 of them to 5 Arduino analogue ports you have 40 lines, each connected to a resistor network of 8 (from 470k to 2k2) giving you 320 inputs.I have not yet calculated what time the decoding will take. Most likely not so much, as most of the time most keys will be open which can be easily detected....
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16