How to initialize the SD Card

Started by asoriano, April 23, 2020, 07:14:23 AM

Previous topic - Next topic

asoriano

Trying to find documentation on how to initialize the SD Card in micropython and came across this site:

http://docs.micropython.org/en/latest/library/machine.SDCard.html.

I tried to follow directions but I'm getting errors. Any help is appreciated.

Thanks a lot!

JohnS

You should probably tell us the errors!

John

LubOlimex

Technical support and documentation manager at Olimex

asoriano

I have the ESP32-EVB.

This is the code I used.

>>> from machine import Pin, SDCard
>>> import os
>>> sd = machine.SDCard(slot=1, width=1, sck=Pin(14), miso=Pin(2), mosi=Pin(15))
>>> os.mount(sd, '/sd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>>

Thanks for any help.