I don't think that this method will work because it depends on what the voltage levels are for HIGH and LOW and the amount each LOW pulling on a HIGH will decrease the voltage. You have no way of determining the actual combination of switches closed.About the voltage: with one or few switches closed, it's very close 5V (readings around 1000), and it drops geometrically with the number of closed switches. With 6 switches closed (as per my 1st post, photo + "serial monitor" picture), readings are of just around (5/1023)*50 = 0.25V.
CD4017 output voltage specs:
The outputs of a single CD4017 will be similar under load, but that isn't guaranteed between IC's.
Last edited: