4 Buttons, 4 Lights

Firstly thanks for posting the linked article ( use a push button as a toggle switch - Programming Questions - Arduino Forum ) , but now a very noobish question lol.

How do I add other bottons and lights to this? (4 of each, individually switched 1 to 1, 2 to 2 etc.)

I have tried various ways, but at the best I get button 4 turning all 4 lights with the other buttons doing nothing :frowning:

Thanks in advance for any and all help :slight_smile:

Post your "best effort" and we can help you.

Show us what you tried.

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:

why don't you try using two arrays identifying the input button pins and the output led pins, rename loop() as a subfunction with an index argument and have it called for each of the for array indices from a new loop().