I\'ve uploaded a sketch to an Arduino Uno whose loop is something like this:
void loop(){
Serial.println(\"Hello, World!\");
}
So, now,
If nothing helped then you should arrange one more board and try to flash it through the Arduino as ISP option as shown in Arduino as ISP and Arduino Bootloaders or From Arduino to a Microcontroller on a Breadboard.
Instead of a boot loader, you can select your own programs to flash via ISP.
After scratching my head about this problem, here is a very simple solution that works anytime:
// Empty sketch to fix the upload problem
// Created by Eric Phenix
// Nov 2014
void setup()
{
}
// The loop routine runs over and over again forever:
void loop()
{
delay(1000);
}
Et voila!
I just spent the last five hours searching for a solution to this problem (serial port COM3 already in use and grayed out serial port)...I tried everything every forum and Q&A site I could find suggested, including this one...
What finally fixed it (got rid of the last code I'd input that got stuck and uploaded simple blink function)?
Follow this link -- http://arduino.cc/en/guide/windows and follow the instructions for installing the drivers. My driver was "already up to date", but following these steps fixed the glitch. I am now a happy camper once again.
Note: Resetting the board manually with the button on the chip, or digitally through miscellaneous codes on the Internet did not work to fix this problem, because the signal was somehow blocked/confused between my Arduino Uno and the port in my laptop. Updating the drivers is like a reset for the "serial port already in use" problem.
At least so far...