You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I think E.getConsole() can return USB also if it is not connected when it is the default in board file.

    Yes, that's true, or if you force it with USB.setConsole(1).

    So right now I don't think we have a way, except to alter the code as @fanoush has done. IMO a Serial.isConnected might be quite good. It would be handy for Bluetooth, but also for Serial1/etc it could still return true/false depending on whether they've been set up.

    What board are you using @MarkBloom? Is it your own custom one?

About

Avatar for Gordon @Gordon started