Multiple buttons...

This is somewhat unrelated to Arduino, but I know one of you guys could help me.

I plan on connecting several (25 or so) SPST pushbutton switches to my Arduino (via multiplexers). I know that I can use SPST switches in this manner:

If I use multiple switches, however, it would require multiple resistors. Is there any way to do this with less hardware? If I have to, I'll use a bunch of resistors, but I'd rather not :P

Yep, have the switches pull down to ground and enable the internal pull up resistors or use TTL multiplexers that float high by default.

Oh, I didn't think of that. Thanks!

What should we do with this electrical circuit, How to make it real?

It is real but better is to connect the switch between the input and ground. Then either put the 1K from the input to +5V or enable the internal pull up resistors by doing digitalWrite(pin,HIGH) after setting that pin as an input.

Okay, so I'm a little confused. I don't think the multiplexers I am using default to high, so I can't just connect the switches to ground. Since the switches are behind multiplexers, I can't use the internal pullup resistors in the arduino. Is there a way to use a single pullup resistor for all of the switches, or does each switch need its own?

I don't think the multiplexers I am using default to high

What multiplexers are you using?

or does each switch need its own?

Yes if you use CMOS multiplexers, why not use TTL ones?

Yeah, I'm using CMOS multiplexers. This is what I'm confused about. I am trying to build the PocketPiano from these schematics:

The multiplexers are CMOS, but the actual connection between the multiplexers and the buttons is not shown. I know each switch isn't using a resistor, because the version using the kit looks like this:

Also, some sample code is here. I'm not even sure if a high or low makes the piano play notes...

Yes you will need pull up resistors. Why on earth would someone design a digital multiplexing circuit using analogue multiplexers I don't know. The problem is that it is too easy to make a bad design and put it on the net. So no way round it but use resistors. To make the wiring easer have you come across thin film resistor arrays like this:-? http://uk.farnell.com/bourns/4609x-101-101lf/resistor-network-100r/dp/9356797 They use a common connector for one end of all the resistors so are ideal for pull ups.

I'm just curious how the kit would work, because it definitely does not have many pull up resistors, based on the picture.