-
• #2
I've had the same problem. :S this thread helped me out:
-
• #3
I guess one way is to assign the console to Loopback:
USB.onData(function (d) { LoopbackB.write(d); }); LoopbackB.onData(function (d) { USB.write(d); }); LoopbackA.setConsole();
But things like Ctrl-C to break won't work then.
Can anyone think of a reason why
setConsole
shouldn't just override the automatic changeover? (the changeover happens if USB connects and you're on Serial1, or if USB disconnects while you're on USB)Perhaps
Device.setConsole(true)
could force the console to stay in place, andDevice.setConsole()
would have the existing behaviour.
I have serial devices connected to both serial1 and serial2 on my Pico. I need to keep the console output off of these when USB is disconnected and pico running on external power.
The desired behavior is to have the console on USB when USB is connected, and if no USB, console output is discarded. Am I missing some way to achieve this?