I am using these danged things as fast as I can come up with ideas, and that is pretty fast. I love 'em. In almost all of my projects, the Teensy is the microcontroller mounted on a custom PCB that has all the rest of the functional hardware I need. (It is so much faster than mucking about trying to get a STI (or whatever) device on there and then programming it with some other editor. I use VisualStudio for both the Teensy code and the higher level code.)

So I almost always have to have the higher level code find the port that the Teensy is on. The easiest way is to look at the long description that is part of each com port until it finds the one with the string "Teensy" in it. Works great except that not all computers provide that in the name. My development computer does, i.e. "Teensy USB Serial (COM9)" but my laptop does not. "Universal Serial Port (COM5)" They are both running Windows 10.

That means that I can't rely on this method. The next best option that I have used is to create a "WhosThere" function in the Teensy. When it gets a "WhosThere" request on the serial port, it response with some secret identity string that is used for just this application. (That way, I can have multiple Teensy-driven boards in the same system.)

In some of my applications I have used a prefix and suffix for each serial transmission from the Teensy, such as "ABC>" and "<XYZ". The higher level code tests each incoming string for the prefix and suffix. This guarantees that the code has receive the entire string. (This hasn't generally been necessary. Sort of a belts and suspenders thing.

Just asking if any of you might have a nicer way to do this.