Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By lotus49
#49814 I want to use 4x4 matrix keypad with my ESP8266. I have done this successfully in the past on an Arduino Uno using a resistor array and connecting the output to an ADC.

I am considering doing this with the ESP8266 (which is why I just posted another question about the ESP8266 ADC) but I would like to know whether there are better options.

I cannot just connect the 8 outputs to GPIO pins because I don't have enough free GPIOs. I understand that I could buy an I2C interface. Are there any other options worth considering?

Naturally I would rather keep it simple and not use more active components unless I have to but if that is the best approach, I shall go down that route.
User avatar
By lalo_uy
#50038 There is a Keypad library for Arduino that use GPIO o t I2C io.
I'm considering update it for ESP .
Looking at the source code th COL lins ar only used as outputs.
I will try tu use a simple shift register to get more io lines like CD4094
With 2+N GPIO you get a 8xN keypad.

Lalo
User avatar
By lotus49
#50051 That would be useful.

For some reason, the setup that worked perfectly well on my Arduino Uno using a resistor matrix didn't work well with my ESP8266 (a small number of the keys, specifically 7, * and 0 , were very unstable producing widely differing values each time they were pressed) so I have ordered an I2C GPIO expander. I supposed a shift register could be made to work but it seems like a bit of a faff.