Multiple swithces to analog input?
November 2, 2009
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:
Each combination should then output a unique voltage (according to my understanding).
Do you think this would work?
(sorry if this question seems silly/banal but I'm still quite a noob to this electronics mumbo jumbo :)