-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
Milestone
Description
Discussed in https://github.com/orgs/micropython/discussions/16125
Originally posted by AledelaCV November 1, 2024
I have upgraded to version 1.23.0 to 1.24.0 encountering the error when mounting SDCard. The sample code in the previous version works without problem, but in the new version of micropython it generates error:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
OSError: [Errno 5] EIO
Here's the code I'm using:
import machine, os, vfs
# Slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
sd = machine.SDCard(slot=2)
vfs.mount(sd, '/sd') # mount
print(os.listdir('/sd')) # list directory contents
This code works perfectly in version 1.23.0