Problems with Uploading a Sketch [solved]

Hello

I read another thread that ended on 03/10 in which the OP found that by re-soldering two joints his issue was solved. I'm using an Arduino UNO to install the sketch I'm getting messages I'm not understanding. Several weeks ago, I didn't have any trouble uploading the same sketch to another ATMega 328 with bootloader from from Sparkfun. These last two days have been unhelpful in so far as getting my sketch uploaded.

My Arduino was set to COM4 when I opened it later, and again today. I was getting this message:

Serial Port COM4 already in use. Try quitting any programs that may be using it.

And then this appears in the window:

Binary sketch size: 2,748 bytes (of a 32,256 byte maximum)
processing.app.SerialException: Serial port 'COM4' already in use. Try quiting any programs that may be using it.
at processing.app.Serial.(Serial.java:171)
at processing.app.Serial.(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Serial port 'COM4' already in use. Try quiting any programs that may be using it.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:619)

"Okay, well, now what" I asked myself. Then, when I reset Arduino 1.0.3 to COM3. I receive this:

Done Uploading
Binary sketch size: 2,748 bytes (of a 32,256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x30

I've tried with Blink, too. I could upload both Blink, and my custom sketch to the first chip several weeks ago, but I have 4 more here that can't, although Blink did upload to one of the chips. Uno's LED is flashing on and off in 2 second cycles. I'm powering the UNO through the USB.

Thanks for your assistance.

Peace,

Dave

ETA:

There is one port listed in my device manager:

Prolific USB-to-Serial Comm Port (COM4)

There is one port listed in my device manager:

Which disappears when you disconnect your Uno from the computer?

Good question. I'd have thought so, too. The first time I used Arduino a few weeks ago, there was no "Ports" heading in my device manager. Installing the Arduino drivers made Ports appear in device manager. It didn't disappear when I disconnected the USB cable from my computer, but when I rebooted, it was gone. Reconnecting the UNO to my machine brought the ports heading back.

Odds are high you have a background application that finds the Arduino serial port and opens it expecting to find a mobile phone on the other end.

• Shutdown the computer
• Disconnect the Arduino
• Boot the computer
• Load the Arduino IDE
• Prepare a simple blink sketch
• Verify the sketch
• Connect the Arduino
• Upload

Does that work?

Thank you again; I appreciate the help.

I followed the procedure exactly, but - drat - there is no blinking on the Arduino board, and I get this readout:

Done uploading
Binary sketch size: 1,084 bytes (of a 32,256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x30

I don't know much about what that means, but "not in sync" doesn't sound good.

Try a different USB cable.

hey check you board in IDE.. make sure its the correct board u using to upload the code

Okay; same result with a USB cable that is working.

Good thought, It's set for Arduino UNO, which is correct.

http://arduino.cc/forum/index.php/topic,73748.0.html
Pass or fail?

Pass

• Shutdown the computer
• Disconnect the Arduino
• Boot the computer
• Start Device Manager
• Ensure nothing is connected to the Arduino except the USB cable
• Connect the Arduino to the computer

Is the device insertion sound generated?

Does the Arduino appear in Device Manager under Ports?

• Start the Arduino IDE
• Ensure the correct board and serial port are selected
• Load a simple sketch like Empty or Blink
• Upload

What is the exact error message?

[quote author=Coding Badly link=topic=156693.msg1180409#msg1180409 date=1364768347]

Is the device insertion sound generated?[/quote]

Yes

Does the Arduino appear in Device Manager under Ports?

Prolific USB-to-Serial Comm Port (COM5); no ports heading appeared until the Arduino was connected. After the device insertion sound, then the ProliOM5) appeared under Ports. When I last checked, it stays under the Ports heading until reboot.

What is the exact error message?

Done uploading
Binary sketch size: 1,084 bytes (of a 32,256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x30

Thank you

If you have a Prolific USB to serial device, then you don't have a genuine Arduino UNO. You have a clone.

The problem with clones is that you don't know what bootloader is installed and if the board was made properly.

You should also make sure you have the latest drivers for the Prolific USB to serial device:
http://prolificusa.com/pl-2303hx-drivers/

Thanks for the excellent post; problem solved. Yes, my Arduino is self-made a clone. I have an ATMega168 with no bootloader, and that seems to have been mixed in with the ATMega328s that do have the bootloader. The bigger problem was that I missed a contact when I soldered the socket into place. Once that was soldered, the ATMega328s were simple to load with my sketch. Thanks very much for your help, all of you.

Peace,

Dave