Go Down

Topic: Port already in use OR not found (Read 1 time) previous topic - next topic

ste4os

I was trying my little sketch when Arduino ide crash... So i launch again the ide but now i can't upload file on board! If i click on tools the program slows and after 20 sec appears: Port already in use and sometimes also appears port not found!
What could have happened? :(

spycatcher2k

Have you restarted your computer (is it windows or mac?)? Have you reinstalled the drivers? Have you got the current IDE(don't know what version you havbe)? Have you Re-Downloaded and extracted the IDE?
We need more info - what have you tried, what do you mean by 'I was trying my little sketch...', were you just typing, opening the sketch, or uploading.



Drew
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

ste4os

I've restarted yes. I use Ubuntu.. I have delete the folder and re-extract it. I compile the sketch, but when i try to upload it on arduino i have the problem!

The sketch that initially works is:
Code: [Select]
void setup(){
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop(){

    int inByte = Serial.read() - ('0');
    if(inByte == 1)
      digitalWrite(13, HIGH);
    if(inByte == 0)
      digitalWrite(13, LOW);
  }


}


ste4os

Code: [Select]
processing.app.SerialException: Serial port '/dev/ttyACM0' already in use.  Try quiting any programs that may be using it.
at processing.app.Serial.<init>(Serial.java:144)
at processing.app.Serial.<init>(Serial.java:76)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
at processing.app.Sketch.upload(Sketch.java:1603)
at processing.app.Sketch.exportApplet(Sketch.java:1568)
at processing.app.Sketch.exportApplet(Sketch.java:1524)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2302)
at java.lang.Thread.run(Thread.java:636)
processing.app.debug.RunnerException: Serial port '/dev/ttyACM0' already in use.  Try quiting any programs that may be using it.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:99)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
at processing.app.Sketch.upload(Sketch.java:1603)
at processing.app.Sketch.exportApplet(Sketch.java:1568)
at processing.app.Sketch.exportApplet(Sketch.java:1524)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2302)
at java.lang.Thread.run(Thread.java:636)


Appears on the terminal

ste4os

I think that my problem is similar to  http://stackoverflow.com/questions/5290428/how-to-reset-an-arduino-board

spycatcher2k

disconnect arduino from everything (including PC).
Press RESET and reconnect usb - keep RESET pressed
hit upload in IDE
when sketch size comes up release RESET.

See if that helps


Drew.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

spycatcher2k

The post you have provided is for arduino uno - not the normal arduino.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

ste4os


The post you have provided is for arduino uno - not the normal arduino.

I've Arduino UNO.  Sorry i forget to say it :) And sorry for my bad english  :smiley-mr-green:

spycatcher2k

No problem - have you tried the above?
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

ste4os

Yes, the result:
Code: [Select]
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x00

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x00
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x00
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00

:(

spycatcher2k

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

ste4os

Mmm i can't enter in the forum :\ can you copy + paste the main text?

spycatcher2k

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly


spycatcher2k

Its a 3 page tutorial (with pics) - I just don't have the time to cut n paste it.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy