Someone was asking for a solution to sensing 48 buttons. I thought since I might need a solution to a similar problem, I mocked up a diagram that uses 1 analog pin, 8 digital pins, and 7 resistors. Will it work?
The digital pins will be pulled to GND for the active column and left in tri-state for non-active columns.
Thanks for the link. There’s no code on the site though. I was a bit concerned when driving with a port extender but since this extender has an open-drain mode, there won’t be problems. Still one needs to use it so inactive columns are not driven to opposite polarity. It would short if you drive column 0 to high and 1 to low and hold two buttons one from column 0 and one from 1. If I use arduino pins under tri-state mode, the problem is solved.
I think I will give my own schematic a try with a membrane matrix keypad. I have a bunch at home. Next time I order from digikey, I’ll grab a few of those port extenders.