Turning LED off quickly after motion sensor trigger.

Thanks for the input. I have updated my code accordingly in my original post.

I did originally have a delay between the LED being turned on and the off. It was like this.

int ledState = LOW; 
int motion = 5;
int motionLed = 7;

void setup() {
  pinMode(5, INPUT);
  pinMode(7, OUTPUT);
}

void loop()
{
 short sensor = digitalRead(motion);
  if(sensor == HIGH){
     digitalWrite(7, HIGH);  
    delay(500);             
     digitalWrite(7, LOW);

   }
}

That didn't have any impact on how quickly the LED turned off. It still stays on for a couple seconds. I did suspect that it was still seeing the sensor input as HIGH, but I'm just not sure how to get around that.