SD card doesn't work on pysense
-
I have the same or a similar issue. Upon sd = machine.SD() I get "OSError: the requested operation failed
MicroPython v1.8.6-849-83e2f7f on 2018-03-19; FiPy with ESP32"import os import machine [...] ### SD Card sd = machine.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()
-
@freddy
That seems to mean the SD module hasn't been imported, did you dofrom machine import SD
first?
-
@jmarcelino made a little bit of progress, was abble to read out the content of the card, however suddenly out of nowhere a new issue popped up, i get the following error:
Traceback (most recent call last):
File "<stdin>", line 13, in <module>
NameError: name 'SD' is not definedDo you maybe know a fix to that?
-
@freddy
Can you try another card please?
-
@jmarcelino tried it, i get exactly the same error
-
@freddy
Can you try to format the SD card on the Pysense?import os from machine import SD sd=SD() os.mount(sd,'/sd') os.mkfs(‘/sd')