Description
Hi there,
I've been trying really hard to sort out this error with wiring and looking at other forums but just cannot work it out.
This is the error message I get when using sdcard.py:
Traceback (most recent call last):
File "", line 19, in
File "sdcard.py", line 231, in readblocks
OSError: [Errno 5] EIO
And this is the code I am calling it from:
import machine
import sdcard, uos
import time
cs = machine.Pin(13, machine.Pin.OUT)
Intialize SPI peripheral (start with 1 MHz)
spi = machine.SPI(1,
baudrate=1000000,
polarity=0,
phase=0,
bits=8,
firstbit=machine.SPI.MSB,
sck=machine.Pin(14),
mosi=machine.Pin(15),
miso=machine.Pin(12))
sd = sdcard.SDCard(spi, cs)
time.sleep_ms(500)
vfs = uos.VfsFat(sd)
uos.mount(vfs, "/sd")
#uos.mount(sd, '/sd')
time.sleep_ms(500)
print(uos.listdir('/sd'))
If anyone could help that would be appreciated!