


12 push buttons on a ESP32
Hi! For a sequencer project, I need to connect these 12 push buttons to an ESP32, using a Ground-to-pin configuration (or at least that's what I'm thinking about). Now the problem is that the Esp32 devkitv1 doesn't have enough pins capable of reading pish buttons ins. I think I have two options here, and I'd like to know which one you think it's best and why:
Option 1: use a series of different resistors, an connect all the push buttons to one analog pins (3v -> push buttons sequence -> analog pin), given the different resistors values, I should read different currents on each button and therefore know what is being pressed. This seems kinda long to do, and I'm concerned that I wouldn't be able to read multiple buttons being pushed at the same time correctly
Option 2: connect the buttons, keeping the ground-to-pin configuration, to a MCP23017 I2C GPIO extension module, which should be able to handle all of them. I never used this module, but I have a couple from a box of scavenged electronics I found a year ago.
If you have another idea in mind let me know :)
Thank you all in advance