@timh When we dig down the G15 pull up to enable SD card use 10K resistor,
G15 is also SD_DAT. I wonder if when USB power is connected the 10K isn't quite correct and write operations once i2c is in use, causes insufficient voltage for SD writes ? I assume a write requires more power.
@johand Thanks for the info, I'm able to reproduce the issue. There's indeed a problem in the upload feature, which has been solved in the latest versions of Atom. The VSC plugin is a bit behind code wise. We're working on a refactor of the Atom upload feature right now, when that's done we'll upgrade VSC as well to be up to date with it. That'll solve this issue.
For now either be a bit patient with uploading with VSC or temporarily switch to Atom for this project. Sorry for the inconvenience!
@dylan It is hard to believe that this is the reason, because the standard value for sys.path is ['', '/flash', '/flash/lib']. Since main.py resides in /flash, any code to be imported may reside at that place too, like also in /flash/lib or the actual directory (frisdt entry). The latter may be the a cause, if you have multiple copies of your code, good and bad ones, on the file system.
Thanks, sorry I did not see the "compose" with question mark inside the box. The documentation is pretty clear. I am a member of so many forums and they all have different tools. Wonder if there will be a shake up at some stage to use something like the wiki toolset which does most thinks.