Hi, I’m guessing that your using an ESP8266-12 as you have ADC broken out. If so you could try using GPIOs 0, 1, 2 & 3 as rows with 10K pullups and GPIOs 12, 13, 14 & 15 as columns with 1k in series (GPIOs 4 & 5 are free for other use) (GPIO 15 also needs a 10K pull down resistor).
Set 0 -> 3 as inputs (with interrupts if required) and 12 -> 15 as outputs and low.
With no button press 0 -> 3 should be high, going low on a press.
If a press is detected 12 -> 15 can be taken high in turn, removing the low on 0 -> 3 and giving the column of the press.
GPIOs 1 & 3 are Tx & Rx but can be used as normal GPIOs if you don’t need serial.
Code: Select allpinMode(pin, FUNCTION); // FUNCTION 0 is Tx Rx, FUNCTION 3 is GPIO for pins 1 & 3.
You should be able to use GPIO 16 as well but I can’t find the FUNCTION number for that at the moment.
Not ideal as it uses up a lot of GPIOs but it can be done. If it was me I'd keep Tx & Rx during development and just use rows 0 and 2 of the keypad for prooving.