Timing question

Simple button press NO contact
LED lights
delay(x)

So I set the millis 5000, push the button momentarily, LED lights and stays on 5s.

Then I push the button and hold it down, LED lights and stays lit whatever duration the button closed.

But when button released the LED does not stay lit for 5s???

I'm missing something here??? Sketch initialized delay on button push. I thought as long as button was closed each time the program cycled and found the contact closed it set the delay over and over, not just a one shot deal??? What is going on here? What have I missed?

You are missing to show us your sketch.

Always show us your ‘current’ compete sketch.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.

[code] Paste sketch here. [/code]

Show us a good schematic & image of your circuit wiring.
Posting images:
http://forum.arduino.cc/index.php?topic=519037.0

//demonstrating digital input

#define LED 12
#define BUTTON 7

void setup() 
{
  pinMode(LED,OUTPUT);
  pinMode(BUTTON,INPUT);
}

void loop() 
{
  if(digitalRead(BUTTON)==HIGH)
  {
    digitalWrite(LED,HIGH);
    delay(5000);
  }

  else
  {
    digitalWrite(LED,LOW);
  }
}

K got it, delay STOPS the sketch running for delay(x)

The functions delay() and delayMicroseconds() block the Arduino until they complete.
Have a look at how millis() is used to manage timing without blocking in Several Things at a Time.

And see Using millis() for timing. A beginners guide if you need more explanation.

...R