We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have written some code which automatically connects to every COM port on your PC and listens to it for 2.5 seconds. If the computer receives a or several byte(s) it stays connected with that COM port. Otherwise it moves to the next. And it works quite nicely, it also works when you plug in an Arduino or something when the program is already running.
However when I try to connect with a COM port which is 'busy', the program crashes. I won't be dealing with already connected COM ports but I do like to know how I can:
3. deal with the error you get when you try to connect with a busy COM port? (special Event Handler?) RuntimeException solves dat problem.