Hello
Any pointers to getting sdcard working on a Lolin S3 Pro?
I have tried
import os
from machine import Pin
from machine import SDCard
sd = SDCard(slot=2, sck=Pin(12), mosi=Pin(11), miso=Pin(13), cs=Pin(46))
os.mount(sd, "/sd")
but am getting
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
OSError: (-258, 'ESP_ERR_INVALID_ARG')
How to mount sdcard on S3 Lolin Pro via Micropython
Re: How to mount sdcard on S3 Lolin Pro via Micropython
I think at first it's better to make sure that the SD card and card holder are good. Check the card separately along with the holder. If you have an arduino, you can check easily. Connect your SD card to the arduino and upload cardinfo example of the arduino ide. Thus you can at least find out if the problem is in your SD card or in your coding.
Re: How to mount sdcard on S3 Lolin Pro via Micropython
The card works ( I tested independently.)
Just for anyone else:
What I found worked is this:
where N =1 or 2
Just for anyone else:
What I found worked is this:
Code: Select all
import sdcard
sd = sdcard.SDCard(machine.SPI(N, sck=machine.Pin(12), mosi=machine.Pin(11),
miso=machine.Pin(13)), machine.Pin(46))
os.mount(sd, "/sd")
print(os.listdir("/sd"))
Who is online
Users browsing this forum: MicroController and 86 guests