Pages: [1]   Go Down
Author Topic: Problems with Uploading a Sketch [solved]  (Read 1790 times)
0 Members and 1 Guest are viewing this topic.
Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

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

And then this appears in the window:

Quote
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.<init>(Serial.java:171)
   at processing.app.Serial.<init>(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:

Quote
Prolific USB-to-Serial Comm Port (COM4)
« Last Edit: April 02, 2013, 03:21:00 am by Nick Gammon » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13038
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
There is one port listed in my device manager:

Which disappears when you disconnect your Uno from the computer?
Logged

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13038
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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?
Logged

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13038
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Try a different USB cable.
Logged

malaysia
Offline Offline
Full Member
***
Karma: 2
Posts: 101
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

dut eden rockes

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13038
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pass
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13038
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


• 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?
Logged

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Is the device insertion sound generated?

Yes

Quote
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 Proli<snip>OM5) appeared under Ports. When I last checked, it stays under the Ports heading until reboot.

Quote
What is the exact error message?

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

Thank you
Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
Logged

Washington, PA
Offline Offline
Newbie
*
Karma: 0
Posts: 32
A job worth doing is worth doing right
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: