RESOLVED - How can I debug an issue with SD Card reading?
Posted: Mon Apr 22, 2019 11:10 pm
As far as I can tell, I have read all the SD card related posts, and can't seem to figure out why I can't simply connect an SD card reader to my ESP32's. I have tried both hardware SPI and software and can't seem to mount and SD card.
I am able to mount the same SD card using micro python on an esp8266 however. It seems strange to me that the process would not be identical. Any assistance in how I should go about tracking down why it is failing would be greatly appreciate.
Everything seems to go fine until I try to mound the sd card object.
If possible try to imagine you are talking to a gorilla because I am pretty new to all this so dumb it down for me if you can.
Here is the basic code that I have that is failing.
Failed with 2 separate SD cards, pny and sandisk
Failed with 3 separate SD card readers
Failed on 3 separate ESP32 board types.
Here is the basic code I'm trying to use.
>>> import sdcard
>>> from machine import SPI, Pin
>>> import os
>>> spi_sd = SPI(-1, sck=Pin(18), mosi=Pin(23), miso=Pin(19))
>>> sd = sdcard.SDCard(spi_sd, Pin(5))
>>> os.mount(sd, '/sd')
Traceback (most recent call last):
File "<stdin", line1, in <module>
OSError: [Errorno 19] ENODEV
>>>
Here are the 3 boards I've tried on.
https://www.ezsbc.com/index.php/feature ... L5ImOhKiUk
https://www.ebay.com/itm/MINI-D1-ESP32- ... SwyutchAgp
https://www.ebay.com/itm/TTGO-MINI-32-V ... 2749.l2649
I am able to mount the same SD card using micro python on an esp8266 however. It seems strange to me that the process would not be identical. Any assistance in how I should go about tracking down why it is failing would be greatly appreciate.
Everything seems to go fine until I try to mound the sd card object.
If possible try to imagine you are talking to a gorilla because I am pretty new to all this so dumb it down for me if you can.
Here is the basic code that I have that is failing.
Failed with 2 separate SD cards, pny and sandisk
Failed with 3 separate SD card readers
Failed on 3 separate ESP32 board types.
Here is the basic code I'm trying to use.
>>> import sdcard
>>> from machine import SPI, Pin
>>> import os
>>> spi_sd = SPI(-1, sck=Pin(18), mosi=Pin(23), miso=Pin(19))
>>> sd = sdcard.SDCard(spi_sd, Pin(5))
>>> os.mount(sd, '/sd')
Traceback (most recent call last):
File "<stdin", line1, in <module>
OSError: [Errorno 19] ENODEV
>>>
Here are the 3 boards I've tried on.
https://www.ezsbc.com/index.php/feature ... L5ImOhKiUk
https://www.ebay.com/itm/MINI-D1-ESP32- ... SwyutchAgp
https://www.ebay.com/itm/TTGO-MINI-32-V ... 2749.l2649