A tutorial for successfully using the SD Card Reader in any of the expansion modules.
-
Forgive me, but I have literally been searching for hours. I have a need to create a small datalogger and I was following the examples at https://docs.pycom.io/firmwareapi/pycom/machine/sd/. The SINGLE example does not seem to work. the f.readall() method completely fails with an "AttributeError: 'TextIOWrapper' opbject as not attribute 'readall'
from machine import SD import os sd = SD() os.mount(sd, '/sd') # check the content os.listdir('/sd') # try some standard file operations f = open('/sd/test.txt', 'w') f.write('Testing SD card write operations') f.close() f = open('/sd/test.txt', 'r') f.readall() f.close()I have literally wasted an entire day working on this. Can someone point me to a comprehensive documentation of the SD card API and its usage? There is no reason for simple things to be this hard. We have come from Particle.io in search of a better product and I am finding the documentation to be a hopeless morass of blind alleys.
Thanks in advance!
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