Thanks for the quick reply. I used a USB-TTL converter to see what was on the serial interface when using the same USB power supply.
First I powered on the Pico and connected the serial converter while it ran. I could send commands over the serial interface and the Pico would answer but I did not see any errors (as expected as the Wifi is setup on startup). When I powered on the Pico while the serial converter was connected, it worked without any errors.
So I moved all my onInit() code to a function called foo() and called this method with setTimeout(foo, 20000) from onInit(). My plan was to power on the Pico and then after that connect the serial converter so that I could see what was happening when it tries to connect to the Wifi. But this worked also.
So I just leave the setTimeout() call in onInit and so far it works fine....
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.
Thanks for the quick reply. I used a USB-TTL converter to see what was on the serial interface when using the same USB power supply.
First I powered on the Pico and connected the serial converter while it ran. I could send commands over the serial interface and the Pico would answer but I did not see any errors (as expected as the Wifi is setup on startup). When I powered on the Pico while the serial converter was connected, it worked without any errors.
So I moved all my onInit() code to a function called foo() and called this method with setTimeout(foo, 20000) from onInit(). My plan was to power on the Pico and then after that connect the serial converter so that I could see what was happening when it tries to connect to the Wifi. But this worked also.
So I just leave the setTimeout() call in onInit and so far it works fine....