Error opening serial ports

Hey I’ve been looking around for over an hour and I couldn’t find any solution to fix this issue of mine so i decided to sign up here and hope to find some answers.

I’ve been using the processing software and I wanted this file to run but it seem like I’m having a hard time even running the process.

I really hope someone could help me out with this because my project is being delayed and I’m getting tired of googling all over. Thank you!

If it worked previously and won't work this time it could be that another copy of Java still has the serial port open.

I don't know Windows but there should be some system program that allows you to see what programs are running and kill ones that you no longer want. On Ubuntu Linux it is called System Monitor.

...R

Thank you for the fast reply but the port isn't exactly busy, it can be used by the arduino software but not with the processing only. I'm not sure if its a script side error or the software itself. Some input on this will be greatly appreciated.

fearisamotivator: Thank you for the fast reply but the port isn't exactly busy, it can be used by the arduino software but not with the processing only.

That is not inconsistent with what I suggested. It may be that the instance of Java that is running the IDE is not freeing up the port so that the instance of Java that runs Processing can use it.

Have you checked to see how many instances of Java are running?

Have you tried the common (if inconvenient) solution of switching off the PC and restarting it?

If that works then you would probably have got the same result by killing the unwanted instance of java.

...R

it can be used by the arduino software

"The Arduino software" as in the IDE can be used to upload sketches? Or "the Arduino software" as in the Serial Monitor application?

Thank you for the reply Robin and Paul. Well restarting didn’t help but apparently I removed

Port = new Serial(this, portName, 9600);

and only kept

port = new Serial(this, Serial.list()[0], 9600); "

Doing this helped me launch it nicely. Changing the port to myPort also helped “automagically”.

Slowly getting a hang of this scripting. Thanks alot guys!