Wipy 2.0 Cannot read internal flash without a SD card inserted
-
I'm trying to read a file from the internal flash, but to do so I must have a sd card inserted even though I'm not using it.
If I try without a card I get this:
>>> from machine import SD >>> sd = SD() Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: the requested operation failedIt works fine when a SD card is inserted.
Is what I'm trying to do possible?
-
hello,
what is your code to read your file ?
you don't need to use SD to play with the internal flash file system.
Example to list files and read the content of the boot.py file in the internal flash file system :import os os.listdir() f = open('boot.py') f.read() f.close()Friendly, J.P
-
Ah derp. yeah that works.
I'm new to (micro)python & coding for hardware, so learning lots at the moment.Thanks.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login