• Yes, I can see that's annoying. If someone's left something on the input line, Ctrl-C clears it off (as well as breaking out of a loop if someone's code was in one), so it is often needed.

    If you enter a few characters before you disconnect, when you reconnect do you get the same problem? If I changed the Web IDE to send a space before the Ctrl-C it might magically fix it?

    The other thing you could do (if you just want to read data from USB with the Web IDE but don't want it breaking things), is to move the console away from USB on startup. For instance you could do:

    Serial1.setConsole();
    

    You'd then have to change your console.log(...) to USB.println(...), but whatever the Web IDE then did, it wouldn't be able to mess up your program's execution (until you explicitly moved the console back with USB.setConsole())

About

Avatar for Gordon @Gordon started