A long time ago I used to mount SD Cards with my Lolin D32 PRO using this code and the sdcard.py driver:
Code: Select all
import machine, sdcard, os
sd = sdcard.SDCard(machine.SoftSPI(baudrate=100000, polarity=1, phase=0, sck=machine.Pin(18), mosi=machine.Pin(23), miso=machine.Pin(19)), machine.Pin(4))
os.mount(sd, '/sd')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
After reading the v.1.16 docs, I tryed machine.SDCard() with this code:
Code: Select all
import machine
sd=machine.SDCard(sck=18, cs=4, miso=19, mosi=23)
import os
os.mount(sd, '/sd')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 16
The SD Card is good, as I can mount, read and write with my Pyboards.
What am I doing wrong?
Thanks in advance!