Go Down

Topic: Problems with Uploading a Sketch [solved] (Read 1 time) previous topic - next topic

Dave_Burrows

Mar 27, 2013, 01:48 am Last Edit: Apr 02, 2013, 10:21 am by Nick Gammon Reason: 1
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)

Coding Badly

Quote
There is one port listed in my device manager:


Which disappears when you disconnect your Uno from the computer?

Dave_Burrows

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.

Coding Badly


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?

Dave_Burrows

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.

Go Up