I know we can see if the USB is connected to an active virtual com port (windows) - is it possible to detect if the USB is plugged in, before the com port is opened on the host?
In my case I’m using Teraterm to do some setup over serial USB, and I’m using Serial.isConnected() to prevent Sleep while the connection is live - but this means I have to quickly activate the correct serial port in Teraterm to catch the Photon before it sleeps again. It would be nice if the code could see if the USB was plugged in even if the com port was not active. I would have thought it possible as windows detects the USB port on the photon as soon as its plugged in, so the Photon must know its connected to a USB host device.
On a side note: how do I stop Windows creating a new com port every time I plug in a new Photon?