It'll be because when the Pico isn't connected to USB, the 'console' (eg. left side of Web IDE) defaults to Serial1 (on B6/B7), which would then interfere with the ESP8266 also on there.
Try:
E.on('init', function() {
USB.setConsole(); // <---------------------- force USB use even if USB not connected
SPI2.setup({baud: 3200000, mosi: B15});
Serial1.setup(115200, { rx: B7, tx : B6 });
// ....
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi @Tobbe,
It'll be because when the Pico isn't connected to USB, the 'console' (eg. left side of Web IDE) defaults to Serial1 (on B6/B7), which would then interfere with the ESP8266 also on there.
Try: