example of using one analog pin to read 5 switches

Nicely presented, cheers - it helped me to see how you had done what I wanted to do.

I just built a 14 step ladder using 1k resistors connected to a stylophone-like keyboard. Decoding the input is dead easy and with 13 'keys' (one octave) there's still plenty of margin.