microSD card reading
Posted: Wed May 24, 2017 4:18 pm
Object : microSD card reading on FeatherHuzzah and Huzzah ESP8266 boards
with installed micropython firmware.
** for more details about the used firmware see the following upython REPL session report.
As microSD card adapter a Adafruit Micro-SD breakout board is used.
The same SD adapter has been used with a NodeMCU dev board with
a Lua firmware installed. As we can see from the jpeg attachment, from
the ESPlorer session, the SD card reading has been positive. This result
demonstrate that we are working with good SD card adapter e that with Lua
we do not have problems.
I suppose - if I do not have done some wiring error that you can verify from the
attached pictures or from the wiring description - that the problem could be
or in the sdcard.py driver or in the firmware that I have installed on the two
Adafruit ESP boards.
=== MicroPython REPL session ===
>>> dir()
['uos', '__name__', 'webrepl', 'gc', 'bdev', 'vfs']
>>> uos.listdir()
['boot.py', 'webrepl_cfg.py', 'tpa.py', 'sdcard.py', 'bmp180.py']
>>> uos.uname()
(sysname='esp8266', nodename='esp8266', release='2.0.0(5a875ba)', version='v1.8.7-7-gb5a1a20a3 on 2017-01-09', machine='ESP module with ESP8266')
>>> f = open('boot.py', 'r+')
>>> src = f.read()
>>> print(src)
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import gc
import webrepl
webrepl.start()
gc.collect()
>>>
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== """
=== Example taken from from sdcard.py driver file
=== making the following change :
=== machine.SPI(0) becames machine.SPI(1)
===
=== Adafruit hardware wiring
=== SD card adapter pin Huzzah or Feather Huzzah pin
=== CLK 14
=== DO 12
=== DI 13
=== CS 15
=== 3v 3V3
=== 5v
=== """
=== import machine, sdcard, os
=== sd = sdcard.SDCard(machine.SPI(1), machine.Pin(15))
===
Traceback (most recent call last):
File "<stdin>", line 16, in <module>
File "sdcard.py", line 54, in __init__
File "sdcard.py", line 82, in init_card
OSError: no SD card
>>>
with installed micropython firmware.
** for more details about the used firmware see the following upython REPL session report.
As microSD card adapter a Adafruit Micro-SD breakout board is used.
The same SD adapter has been used with a NodeMCU dev board with
a Lua firmware installed. As we can see from the jpeg attachment, from
the ESPlorer session, the SD card reading has been positive. This result
demonstrate that we are working with good SD card adapter e that with Lua
we do not have problems.
I suppose - if I do not have done some wiring error that you can verify from the
attached pictures or from the wiring description - that the problem could be
or in the sdcard.py driver or in the firmware that I have installed on the two
Adafruit ESP boards.
=== MicroPython REPL session ===
>>> dir()
['uos', '__name__', 'webrepl', 'gc', 'bdev', 'vfs']
>>> uos.listdir()
['boot.py', 'webrepl_cfg.py', 'tpa.py', 'sdcard.py', 'bmp180.py']
>>> uos.uname()
(sysname='esp8266', nodename='esp8266', release='2.0.0(5a875ba)', version='v1.8.7-7-gb5a1a20a3 on 2017-01-09', machine='ESP module with ESP8266')
>>> f = open('boot.py', 'r+')
>>> src = f.read()
>>> print(src)
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import gc
import webrepl
webrepl.start()
gc.collect()
>>>
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== """
=== Example taken from from sdcard.py driver file
=== making the following change :
=== machine.SPI(0) becames machine.SPI(1)
===
=== Adafruit hardware wiring
=== SD card adapter pin Huzzah or Feather Huzzah pin
=== CLK 14
=== DO 12
=== DI 13
=== CS 15
=== 3v 3V3
=== 5v
=== """
=== import machine, sdcard, os
=== sd = sdcard.SDCard(machine.SPI(1), machine.Pin(15))
===
Traceback (most recent call last):
File "<stdin>", line 16, in <module>
File "sdcard.py", line 54, in __init__
File "sdcard.py", line 82, in init_card
OSError: no SD card
>>>