• When you unplug, the console will swap over to Serial1 (you can stop it with USB.setConsole(1)) and by default Serial1 is at 9600 baud - so you're probably filling your output buffer with the debug info, which is then slowing everything else down a huge amount.

    I'm surprised it breaks things, but I guess at the speed you're running Serial2 at, it might be that also servicing the Serial1 interrupts causes it to lose the occasional character from Serial2.

    Such is the fun of embedded software - usually I try and run everything at sensible enough speeds that nobody has to worry about it :)

About

Avatar for Gordon @Gordon started