problem uploading code to uno for bluetooth module please help!!!

I have connected a bluetooth module to my uno r3 and the code wont upload to it and i can't figure out the problem. any information would be grately appreciated. thanks

ps here is the code if that helps

char INBYTE; int LED = 13; // LED on pin 13

void setup() { Serial.begin(9600); pinMode(LED, OUTPUT); }

void loop() { Serial.println("Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF:"); while (!Serial.available()); // stay here so long as COM port is empty INBYTE = Serial.read(); // read next available byte if( INBYTE == '0' ) digitalWrite(LED, LOW); // if it's a 0 (zero) tun LED off if( INBYTE == '1' ) digitalWrite(LED, HIGH); // if it's a 1 (one) turn LED on delay(50); }

You need to have bluetooth disconnected when you upload. Have you done that?

yes i have

It is simpler to not get involved with LEDs. You might find the following background notes useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino