HELP: Project in need of help

I have a project that I am trying to do for my Elegoo MEGA2560. But when I run the code I get error messages (avrdude: stk500v2_ReceiveMessage(): timeout ----- avrdude: stk500v2_getsync(): timeout communicating with programmer ----- An error occurred while uploading the sketch).

Can I please get some help.

Here is my code

void setup (){
for(int pin=2; pin<14; pin++){
pinMode (pin, OUTPUT);

}
}

void loop(){

int t = 20;

for(int i=2; i<14; i++){
digitalWrite (i, HIGH);
delay (t);
digitalWrite (i+1, HIGH);
delay (t);
digitalWrite (i+2, HIGH);
delay (t);
digitalWrite (i, LOW);
delay(t);
digitalWrite (i+1, LOW);

}

for(int i=13; i>1; i--){
digitalWrite (i, HIGH);
delay (t);
digitalWrite (i-1, HIGH);
delay (t);
digitalWrite (i-2, HIGH);
delay (t);
digitalWrite (i, LOW);
delay(t);
digitalWrite (i-1, LOW);

}

}

That error message usually means that the Arduino IDE cannot find the serial port for uploading or you may not have selected the correct board.

Have you ever been able to upload a program to that Mega?

What Arduino IDE version are you using?
What PC operating system are you using?

...R