cant upload to arduino nano!!

hi,
i have an arduino nano but every time i try to uploud code to it it gives me this messege :

"Binary sketch size: 2,370 bytes (of a 30,720 byte maximum)
avrdude: verification error, first mismatch at byte 0x0000
0x00 != 0x0c
avrdude: verification error; content mismatch"

here is my code i just want to use hc-06 to control an led from my tablet .
thanks :slight_smile:

char val;
int ledpin = 13;
void setup()
{
  Serial.begin(9600);
  pinMode(ledpin,OUTPUT);
}
void loop()
{
  val = Serial.read();
  if (val == 'F')
  {
    digitalWrite(ledpin,HIGH);
    delay(500);
    digitalWrite(ledpin,LOW);
    delay(500);
    Serial.println("keyes");
  }
}

Do you have the HC-06 connected to pins 0/1? If so, remove those connections before attempting to upload, reconnect after upload.