I created a program with processing witch uses data collected via Arduino's sensors. The problem is that I want my processing program to automatically detect the serial port witch Arduino is connected to.
myPort = new Serial(this, Serial.list()[0], 9600);
With this line of code I need each time to substitute the value (zero) with the correct one witch indicates the right serial port. Is there a way so that it would be automatic and it will work with different computers?
Mad98:
Is there a way so that it would be automatic and it will work with different computers?
I don't know Processing, but I don't think that is possible.
You could write code in such a way that the user can click a button to identify the port to use. That way you don't have to modify the code. See, for example, this Python GUI demo.
Mad98:
I created a program with processing witch uses data collected via Arduino's sensors. The problem is that I want my processing program to automatically detect the serial port witch Arduino is connected to.
myPort = new Serial(this, Serial.list()[0], 9600);
With this line of code I need each time to substitute the value (zero) with the correct one witch indicates the right serial port. Is there a way so that it would be automatic and it will work with different computers?