I am trying to communicate with Arduino through Processing. but I am getting below exception,
Error inside Serial.<init>()
gnu.io.PortInUseException: Unknown Application at gnu.io.CommIdentifier.open(CommIdentifier.java:467) ...and so on
I guess some problem with the Serial Port being used. I am using COM3 for both Arduino and Processing, and I hope that is appropriate.
Arduino is sending some information which I am trying to read on Processing Applet. I can confirm that Arduino is send ing the data because I can view it in Serial Monitor in Arduino.
my Processign code is as below,
import processing.serial.*;
Serial myPort;
String inString;
void setup () {
// set up the window to whatever size you want:
size(800, 600);
// List all the available serial ports:
println(Serial.list());
String portName = Serial.list()[0];
myPort = new Serial(this, portName, 9600);
// don't generate a serialEvent() until you get a newline (\n) byte: