BCD Multiplexing

Im looking for a clever way to use a BCD switch with only 2 or less I/O pins. Im trying to port some code from a Uno to a ATtiny85 Pin part. I only have 2 I/O pins left over and need a user input of 0-9. Any suggestions?

the best i feel like you could do with 2 pins is a taper pot. although with that, you are only going to be able to select one, and you won't know which one you are in, also you are going to need to implement code such as when A0 is less than this, do this, but when A0 is greater than this but less than this, do that.

Along with that issue, I believe the ATtiny85 has 4 analog pins, and you may be using them.

Well you could use the BCD switch to feed a simple four resistor D/A and then read it with an analogue input.

Whats a D/A Grumpy?

Digital to Analogue converter.