- Sun Jan 22, 2017 7:01 pm
#61392
You can have each switch connected individual IO pins. If you do not have enough IO pins available then you will need to use a different approach. I don't know what you consider to be a multiplexer. The term by it's self is not descriptive enough. It could mean that you don't want to use external chips or it could mean that you do not want to do other tricks in order to combine the switch signals that would take less IO pins.
I will throw out one option that I consider is multiplexing but maybe it could be acceptable to you. Use the analog input to measure a resistor string with the switches shorting out different resistors to produce a variable input voltage that you can then use to determine the closed switch.
Below are two ways to accomplish the same thing. Values and voltages should be adjusted to meet your needs.