PIR to trigger motor

I am using a salvaged computer CD drive to design a display of vocabulary words as our students pass through the hallway. The PIR sensor is responding as it should but my motor is not functioning as intended; a single movement of the tray with a short delay fully extended and a return to the case. I am not an experienced programmer and would appreciate help. Thank you.

int timer = 500;
int alarmPin = 0;
int alarmValue = 0;
int ledPin = 13;
int motorPin1 = 9;
int motorPin2 = 10;
int motorEnable = 11;

void setup () {
Serial.begin (9600);
pinMode(ledPin, OUTPUT);
pinMode(alarmPin, INPUT);
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
delay (1000);

}

void loop (){
alarmValue = analogRead(alarmPin);

if (alarmValue < 100){
blinky(); // blinks when the motion has been detected, just for confirmation.

}
delay(timer);

Serial.println (alarmValue);

delay (10);

}

void blinky() {
for(int i=0; i<2; i++) {
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
delay(1000);

digitalWrite(9,HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
delay (1000);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
digitalWrite(11, HIGH);
delay (1000);
//digitalWrite(11,LOW);

}

}

but my motor is not functioning as intended

OK, so what is it doing?

for(int i=0; i<2; i++) {
   digitalWrite(13,HIGH);
   delay(1000);
   digitalWrite(13,LOW);
   delay(1000);

   digitalWrite(9,HIGH);
   digitalWrite(10, LOW);
   digitalWrite(11, HIGH);
   delay (1000);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11, HIGH);
   delay (1000);
   //digitalWrite(11,LOW);

What happened to the nice names?

This works:
digitalWrite(9,HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
delay (1000);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
digitalWrite(11, HIGH);
delay (1000);
digitalWrite(11,LOW);
digitalWrite(10,LOW);
digitalWrite((9,LOW);

Extends the tray, pauses, returns, then stops and waits for the next PIR input. Not sure what you mean by fancy "names"? Thanks.

int alarmPin = 0;
int alarmValue = 0;
int ledPin = 13;
int motorPin1 = 9;
int motorPin2 = 10;
int motorEnable = 11;

here, the pins have nice names (not fancy, just nice), but here

for(int i=0; i<2; i++) {
   digitalWrite(13,HIGH);
   delay(1000);
   digitalWrite(13,LOW);
   delay(1000);

   digitalWrite(9,HIGH);
   digitalWrite(10, LOW);
   digitalWrite(11, HIGH);
   delay (1000);
   digitalWrite(9,LOW);
   digitalWrite(10,HIGH);
   digitalWrite(11, HIGH);
   delay (1000);
   //digitalWrite(11,LOW);
   
 }

they don't. They'd just make reading your sketch easier.

I see what you mean and appreciate the advise.