Simple foil keypad, unknown pinout

i've bought some simple foil / membrane keypads but unfortunately there's no documentation (and i'm a hardware noob). Note this is not a matrix type keypad, it seems there's a dedicated wire for each button.

It's a simple strip with 5 buttons and a LED. The foil cable has 7 wires.

|500x500

My question: how do i connect this, so i can control the LED (GPIO output) and read the buttons (GPIO input)?

I took my multi-meter to measure conductivity between the pins. i found the 3rd pin is common, i.e. if I hook one wire of my multimeter to it I can check which of the other pins corresponds to buttons. Using this approach I mapped wires to buttons, leaving one pin which is connected to the LED. Not sure if there's a resistor in there, so I've not hooked it up yet.

Now the issue: for the buttons to work, I connect the common pin to Vcc and the button pins to GPIO inputs. When i press a button, Vcc is conducted to the input pin and a button press is registered. But for the LED to work, i need an output pin and ground(?), but i have only one pin left.

Am i missing something? Does this need more hardware or is the LED not supposed to be controlled by a GPIO pin?

samtap: i've bought some simple foil / membrane keypads but unfortunately there's no documentation (and i'm a hardware noob). Note this is not a matrix type keypad, it seems there's a dedicated wire for each button.

It's a simple strip with 5 buttons and a LED. The foil cable has 7 wires.

|500x500

My question: how do i connect this, so i can control the LED (GPIO output) and read the buttons (GPIO input)?

I took my multi-meter to measure conductivity between the pins. i found the 3rd pin is common, i.e. if I hook one wire of my multimeter to it I can check which of the other pins corresponds to buttons. Using this approach I mapped wires to buttons, leaving one pin which is connected to the LED. Not sure if there's a resistor in there, so I've not hooked it up yet.

Now the issue: for the buttons to work, I connect the common pin to Vcc and the button pins to GPIO inputs. When i press a button, Vcc is conducted to the input pin and a button press is registered. But for the LED to work, i need an output pin and ground(?), but i have only one pin left.

Am i missing something? Does this need more hardware or is the LED not supposed to be controlled by a GPIO pin?

Welcome to the Arduino forum.

Actually you have hooked the keyboard up backwards!

Each keypad line must go to an Arduino pin set to input pullup. Then your keypad common connection is ground and works for both the keypads and the LED.

The keypad switches will be LOW when pressed, but you can certainly program for that!

Try the LED with a 220 ohm resistor in series and see how bright the LED shines. If not so much, then there is already a resistor in series and you don't need another one.

Paul

But for the LED to work, i need an output pin and ground(?), but i have only one pin left.

You just connect as many things that need a ground to one ground on the Arduino. You do not need a separate pin for each.

Thanks, i was confused but i get it now, doh :-)