Processing says port is not avaliable


if (port.available()>0) {
if (port.readChar()=='s') {


if ( (rpm > targetRpm) && (RpmCondition == false)) {
StartTime = millis();
RpmCondition = true;
if (Serial.available()) {

Do you have the serial monitor open while trying to open the port with Processing?

Learn to use code tags when posting code on the forum. See the sticky "how to use this forum - please read".

Learn to post complete code. My crystal ball says that you're not opening the port or the wrong port; bit foggy at the moment.

I think I know what the problem is. That's my partial answer to your partial code listing. Giving one chapter of a 15 chapter book doesn't really tell the story.

  // list all the available serial ports:

What does that print for you?


What type of arduino ?


Cross posted here.

Cross posting sucks - I’m out of here

Please post ALL your UNO code.

What is the Serial.begin parameter set at?

Thanks.. Tom.. :slight_smile:

Well, that's clearly incomplete.

Please remember to use code tags when posting code

This might help, its a Sparkfun tutorial on Arduino and Processing.

Try their example codes, just to see if Comms works.
Run some simple code to ensure you have connections.

I see all your code, and now you cannot communicate, could you originally communicate with the UNO?

Did you write all the code at once?
I hope you wrote your code in stages and got each stage working before adding and running your final code.

Tom... :slight_smile:

I saw this tutorial when i first started the GUI.Yes each stage is working the problem is I want to start the timer when i reach desired RPM. To solve this problem I print S in arduino to let processing that the timer should start. If you have a better way of doing this please let me know. Thank you for your time and effort.

Have you got the Arduino IDE open while trying to comm with Processing?

Close the Arduino IDE and try again.

Tom... :slight_smile:

You know that your UNO will reboot at the moment your processing sketch connects, right ?
How are you doing the testing?

I upload the code the arduino then close arduino and run processing. The RPM changes but the timer doesn't start