Help need to add a delay for 1 sec for LED5 and external debounce for each LED

Dear Friends
I have two problems with this sketch

  1. I need to put a delay for 1 second then turn it off with the help of millis(); for my LED5 to use with an electric latch to unlock the door.
  2. I want to put a hardware debounce button for LED 1 to LED 4 to control it from inside the room.

Kindly Guide me on these problems.

Can Some Genius Shorten the code as i have repeated the code 5 times for 5 different Buttons... :smiley: :slight_smile: :slight_smile:

Attached File below with all resources, u need to login to see the files and u have to install tinywebserver library along with flash 4 library.

BlinkLed5_new.zip (64.3 KB)

code is cool but need some genius hand to be supercool

capper:

  1. I need to put a delay for 1 second then turn it off with the help of millis(); for my LED5 to use with an electric latch to unlock the door.

Blink without Delay example

  1. I want to put a hardware debounce button for LED 1 to LED 4 to control it from inside the room.

Debounce example

but where to put in this jungle of Code?

tried both the example that's why it is clearly ,entioned in he heading of the post but tried severl days and night without perfect result. please help me to achieve my goal

capper:
tried both the example that's why it is clearly ,entioned in he heading of the post

How so? You don't mention anything in your original post about trying any of the examples. It would be easier to post your code using the CODE tags. If it's long, then you can remove any irrelevant information that doesn't pertain to the issue you're having.

If you're looking for a hardware debounce, here is an article I found after a simple Google search:

http://www.all-electric.com/schematic/debounce.htm