The R-2R ladder should work. Put a buffer between the switches (pulled to Vcc) and ladder inputs, then analogRead the ladder output. The 74hc244 logic IC has exactly 8 buffers and costs around $0.50.
The R-2R ladder should work. Put a buffer between the switches (pulled to Vcc) and ladder inputs, then analogRead the ladder output. The 74hc244 logic IC has exactly 8 buffers and costs around $0.50.