Is there a simple way to detect the presence of an arduino and which serial port it is connected to? If I export a sketch to an executable, the serial port is hard coded.
I thought about having the processing sketch send a message to every serial port and listen for a reply, but this doesnt seem particularly elegant.
The (virtual) serial ports that Arduino create on the PC are only present when the Arduino board is actually plugged in. So if you have no other serial ports, you should be able to tell the presence of an Arduino board by the presence of the serial port.
I've constructed a program using processing which talks to the arduino, and Ideally I would export it as an executable that I could run on other computers besides my own.
The problem is that the total number of serial ports seems to vary in some manner im not aware of, and obviously the settings will vary if i use another computer.
I guess the question is, I am telling processing to look at a specific serial port in a sequence of serial ports (as in hey, look at the third port). Can I tell processing to look at a specific serial port instead (look at COM 7).