Controll 3 leds with 3 buttons

Hello everyone, I'm very new to arduino and I don't know anything about coding but I have been asked by a friend to make a device to control 3 different leds from 3 different buttons. The thing is that I want when the button is pressed, the led to turn on for half second and then to turn off. Like a doorbell. I found a code that works and I modiffied it but now I need to add 2 other buttons.I tried but there wasnt any result. If anyone can, please help!!!

You can find the code for one led in the attacement.

Thank's again.

led button.txt (1.48 KB)

The code for one LED is no use. Please post your attempt at the code you wrote for three LEDs then we can help you to get it working. But first read How to use this forum - please read and post the code correctly as instructed.

Steve

Elias97:
I don't know anything about coding but I have been asked by a friend to make a device

Pretty stupid deal is you ask me... Can you also fix my nuclear reactor? Doesn't matter if you know nothing about it, just make it work.

And a step in the right direction, arrays are your friend :slight_smile: