Problem Uploading Code

Hi Everyone.

I'm a newbie and until earlier I was thoroughly enjoying my tinker time with my Arduino, however for some reason I get the following message when I try to upload my sketches. HERES THE SKETCH.

const int tiltPin = 0;
const int ledEast = 2;
const int ledWest = 10;

void setup() {
  // put your setup code here, to run once:
pinMode (tiltPin,INPUT);
pinMode (ledEast,OUTPUT);
pinMode (ledWest,OUTPUT);
Serial.begin(115200);
attachInterrupt(digitalPinToInterrupt(0), tilted, CHANGE);
            }

void loop() {
  // put your main code here, to run repeatedly:

unsigned long elapsed = millis();

Serial.println(elapsed);
delay(500);

}

void tilted()
{   //subroutine for when interupt occurs.
  if (tiltPin == HIGH){
    digitalWrite (ledEast,HIGH);
    digitalWrite (ledWest, LOW);
    }
    
    else{
      digitalWrite (ledWest,HIGH);
      digitalWrite (ledEast, LOW); 
  }
}

Output in Compiling Window.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.-patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\dwood\AppData\Local\Temp\arduino_build_13354/Hourglassplay.ino.hex:i

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM3 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7a avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7a

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x58 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x58 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x58 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x58 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x58 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd0 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Is anyone able to help?, ive had a little look on the forum and I think it is suggested I re burn by bootloader?, is this advisable and how do I do it?

Huge thanks in advance.

Hmmm would that be pin one you have something connected to ?

Maybe use a different one as zero and one are often used for the USB comms

Do you have anything connected to pins 0 or 1 of the Arduino? Those are used for uploading code, so you need to keep them clear of other devices while uploading code.