0

I chose the correct COM port but it won't upload.

Arduino: 1.8.3 (Windows 10), Board: "Arduino Leonardo"

Sketch uses 5252 bytes (18%) of program storage space. Maximum is 28672 bytes.
Global variables use 228 bytes (8%) of dynamic memory, leaving 2332 bytes for local variables. Maximum is 2560 bytes.
processing.app.debug.RunnerException
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:160)
    at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
    at processing.app.SketchController.upload(SketchController.java:713)
    at processing.app.SketchController.exportApplet(SketchController.java:686)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2149)
    at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port 'COM4'.
    at processing.app.Serial.touchForCDCReset(Serial.java:99)
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:144)
    ... 5 more
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.
    at jssc.SerialPort.openPort(SerialPort.java:164)
    at processing.app.Serial.touchForCDCReset(Serial.java:93)
    ... 6 more
An error occurred while uploading the sketch
Exception in thread "Thread-124" java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    at java.util.ArrayList$Itr.next(ArrayList.java:851)
    at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:123)
    at cc.arduino.contributions.libraries.LibrariesIndexer.setLibrariesFolders(LibrariesIndexer.java:106)
    at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:682)
    at processing.app.Base.onBoardOrPortChange(Base.java:1297)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2179)
    at java.lang.Thread.run(Thread.java:745)

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
  • You tagged the question "Arduino-Nano" but said you have a Leonardo. Which is it? – Nick Gammon Aug 11 '17 at 1:14
1

This is the relevant bit in your error output:

Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.

Is your Leonardo on COM4, or some other port? Does some other program have that port open?

  • Yes I now it is a nono and not a Leonardo. I have trieyd with nono sketches and thers the same problem. – globi1236 Aug 11 '17 at 6:56
  • It doesn't really matter if it's a Leonardo or Nano -- the problem is that the Arduino application can't open COM4. Is the device you are programming on COM4? Is there any other application opening COM4? – jose can u c Aug 11 '17 at 10:49
0

I don't see any trivial solution from the error log, but you can try one or more of the following items:

  • Unplug and replug the USB cable (to check if the connection is ok)
  • Change your USB cable in another USB port from your computer
  • Restart computer
  • Change USB cable
  • Try another Arduino (if you have two megas, or change to Uno if possible), just to check for uploading
  • Reinstall Arduino
  • I install arduino on another device and same error happend. I haven't a other cabel or a arduino. – globi1236 Aug 11 '17 at 7:08
  • I found a new cabel ant it wont work. Weeks ago i have the same problem with an other nano. I think my settings are incorect. – globi1236 Aug 11 '17 at 7:25
  • If you remove the Arduino, see you that COM4 is not in use anymore? And when you reconnect COM4 shows up again? – Michel Keijzers Aug 11 '17 at 8:21
  • Yes. after remove com4 disappear. Plug in again an it shows me com 4 – globi1236 Aug 11 '17 at 10:54
  • Than you can be sure the Arduino is on COM4. If your settings are incorrect, try to reinstall the IDE. – Michel Keijzers Aug 11 '17 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.