Let's Make Robots!

multiple

Multiple swithces to analog input?

Just had an idea. I'm planning to use a LOT of (tactile) switches on a walking robot. For instance I wanna put several under each foot. But it seems like a waste of pins to use a digital pin for each switch (or use multiplexers). So I thought I might be able to connect the switches in paralel and read several at a time from an analog input using resistors of different sizes connected in serial with each switch. Like this:

switches_s.jpg