Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By sigrokBlack
#20296 Hi,
In this thread I want to summary all facts about the SD support of the ESP8266 with the Arduino IDE.
On the net isn't a lot about that.

These things I already found:
*Working example with the Arduino IDE:
https://github.com/esp8266/Arduino/blob ... Server.ino

*Special modules with the pins you need broken out:
Esp-201: http://www.banggood.com/ESP8266-ESP-201-Remote-Serial-Port-WIFI-Transceiver-Wireless-Module-p-964288.html
Esp-12E: http://www.banggood.com/ESP8266-ESP-12E-Remote-Serial-Port-WIFI-Transceiver-Wireless-Module-p-980984.html

What do you know about sd cards and the esp8266? Did you find any schematics or similar?

Greetings from Germany
Joshua
User avatar
By sigrokBlack
#20408 Hi,
its not my code. I found it on the Arduino IDE for ESP8266 repository. When you are using the latest version of IDE 1.6.4 for the ESP, this code is included as SdWebserver.ino.
I've just found it on the repository.

I'm searching for connection schemetics at the moment. Maybe I'll try it with one of my sd cards.

Regards
Joshua
User avatar
By tytower
#20412 I see . So you want to get it going on an ESP8266 .
I'd have a go but my only card readers are on ethernet boards that run on 5 V so I'd have to find a way to get at them or get a separate card reader device.

Looking at SD libraries you need SPI . Looking at SPI examples for Arduino you need the following
* CS - to digital pin 10 (SS pin)-This must be someone elses board
* SDI - to digital pin 11 (MOSI pin)
* CLK - to digital pin 13 (SCK pin)
The SD card examples run OK on the ethernet shield with
* SD card attached to SPI bus as follows:
** MOSI - pin 11
** MISO - pin 12
** CLK - pin 13
** CS - pin 4
So thats a bit confusing but pin 4 is for the ethernet board I have


The ESP does SPI so below is what's on ESP8266/Arduino
on ESP MISI and MISO are on 12 and 13 I think according to wiki
so that will have to be sorted out.

SPI
SPI library supports the entire Arduino SPI API including transactions, including setting phase (CPHA). Setting the Clock polarity (CPOL) is not supported, yet (SPI_MODE2 and SPI_MODE3 not working).


So its a matter of connecting up the device and go to it. I would start by getting something off the card to the serial terminal then add wifi

I did a search on SDcard above and a few came up .This one was interesting viewtopic.php?f=34&t=2496&p=14563&hilit=SDCard#p14563

Another I dont understand yet
gwizz wrote:You also should make sure GPIO2 is floating or explicitly tied high to make sure you only go between the flash programming mode and normal mode, without triggering SDcard boot mode.
I think that means SDIO mode which seems to be entered by pulling GPIO15 (MTDO) pin high and booting. I think that is a Slave mode for SPI maybe.

This statement found on the Olimex site might explain that
" ESP8266 has three modes of operation: SDIO mode, UART mode and FLASH mode. By default the board is configured for FLASH mode operation."

download/file.php?id=33&t=1


Here is a mention of code for spi for the ESP8266
http://bbs.espressif.com/viewtopic.php? ... 7fdfd00706
Last edited by tytower on Sun Jun 14, 2015 4:00 pm, edited 5 times in total.