How to run a code in lopy stored on SD card?
I believe this is trivial question but I would be more than happy if you can help me to run a .py file stored on SD card connected to expansion board with lopy. I tried to find an answer in previous posts but got a bit confused..
Thank you in advance!
@robert-hh great thank you it worked perfectly!
robert-hh last edited by
@monersss You have to mount the SD card first, e.g. with:
from os import mount, chdir from machine import SD sd = SD() mount(sd, '/sd')
Then you can chdir into /sd:
and import the module, or directly import