Why do I get this message please help

Why do I get this message please help;
Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 3,356 bytes (1%) of program storage space. Maximum is 253,952 bytes.

Global variables use 186 bytes (2%) of dynamic memory, leaving 8,006 bytes for local variables. Maximum is 8,192 bytes.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Board at COM4 is not available

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

sensor_distance_finder

#define trigPin 3
#define echoPin 2

void setup() {
Serial.begin (9600);
pinMode (trigPin, OUTPUT);
pinMode (echoPin, INPUT);

}

void loop() {
int duration, distance;
digitalWrite(trigPin, HIGH);
delayMicroseconds(2000);
digitalWrite(trigPin, LOW);
duration + (duration/2) / 29.1;
Serial.print (distance);
Serial.print ("cm");
delay (500);

}

Very strange. Nothing obviously wrong with the code. Looks like the serial communications is failing.

Try turning on the verbose logging (File->Preferences) to see how far it gets in the upload process.

I suspect you meant:

distance = (duration/2) / 29.1;

or the more precise:

distance = (duration / 58.2) + 0.5;

instead of:

duration + (duration/2) / 29.1;