processing takes over my serial monitor!

hi,

i'm trying to get processing and arduino to speak with each other, mostly processing sending data to arduino. the communication sort of works, im clearly getting something through. but i have problems debugging. i would like to use the serial monitor in arduino, but when processing is running, i get the error msg:

Error inside Serial.<init>()

gnu.io.PortInUseException: Unknown Application

      at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)

      at processing.app.Serial.<init>(Serial.java:127)

      at processing.app.Serial.<init>(Serial.java:63)

      at processing.app.Editor.handleSerial(Editor.java:1421)

      at processing.app.EditorButtons.mousePressed(EditorButtons.java:373)

      at java.awt.Component.processMouseEvent(Unknown Source)

      at java.awt.Component.processEvent(Unknown Source)

      at java.awt.Container.processEvent(Unknown Source)

      at java.awt.Component.dispatchEventImpl(Unknown Source)

      at java.awt.Container.dispatchEventImpl(Unknown Source)

      at java.awt.Component.dispatchEvent(Unknown Source)

      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

      at java.awt.Container.dispatchEventImpl(Unknown Source)

      at java.awt.Window.dispatchEventImpl(Unknown Source)

      at java.awt.Component.dispatchEvent(Unknown Source)

      at java.awt.EventQueue.dispatchEvent(Unknown Source)

      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.run(Unknown Source)

is this normal? i can't have the serial monitor running while communicating with processing?

best,

jacob

No, this is not going to work. Today I had, by accident, processing and arduino listening to the same serial port. They both showed some output but incomplete. It looked like missing characters from arduino where visible in processing and vv. It toke me while to figure out that there was nothing wrong with the program. Processing was running on a different desktop so I didn't have both apps in 1 view. I am still suprised the OS didn't complain.

If you could hook up more than 2 devices on a serial port how would you address each device?

I have tried this too and it does not work.. Processing can use its serial library to talk to the Arduino, but once it is doing this the serial port is not accessible to the Arduino IDE. Good luck

D

wow! quick replys! thanks! :smiley:

is there some other way to get output from arduino while processing is running?
i guess i could send the msgs back to processing and display them there?
or perhaps use a monitoring software?

      • i've seen serproxy on the download page, and i have a feeling it might be useful. but i can see no description of the program anywhere?

If you're using Processing to read the serial data, then, yea, just print it out in Processing (with the print() or println() functions). If you're not using the serial port from Processing at all (remove the import processing.serial.* line from the top of your sketch), then it shouldn't take over the serial port; you might have to quit it and restart though. If you're using Processing to send data to the board, you'll probably also need to use Processing to read and display the data coming back.