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

Moderator: igrr

User avatar
By JaPa
#53354 Hello Everyone

I am working on a new project that will provide me a mobile www server with an ESP8266-07 and SD card.
Here as a link to the topic with an SD card project:
http://www.esp8266.com/viewtopic.php?f=32&t=3558

I have already managed to set up my own website on the SD card, but I'm having hard time with that AP mode... I don’t want to use a standard rougher as an AP. The idea is that an ESP8266-07 will provide its own WI-FI so I can connect to it from any device and browse the web from the SD card. Is there anyone who can help me with that project?

Many thx
Jakub
User avatar
By JaPa
#53732 Hello again

Ok, I have spent last two nights trying to solve my own problem :) and I think I managed to do so.
I have ESP-07+SD running AP Mode with captive protocol. So now i can set up my own web server on the go.

Is there anyone interested in that, pls let me know so I will try to describe my setup and the Arduino Code
User avatar
By rootrey
#54834 Hi, JaPa, I'm trying to run a sd card in my esp8266-07, but I'm not having success.


Settings in IDE

Module: Generic ESP8266 Module
Flash Size: 512K (64K SPIFFS)
CPU Frequency: 80Mhz
Flash Mode: DIO
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: ck


Sketch

#include <SPI.h>
#include <SD.h>

Sd2Card card;
SdVolume volume;
SdFile root;
const int chipSelect = 16;

void setup() {
if (!card.init (SPI_HALF_SPEED, chipSelect)) {
Serial.print ("Initialization failed.\n");
} else {
Serial.print ("Initialization ok.\n");
}
}

void loop() {
//
}


Connecting

GPIO-13 - SD / MOSI
GPIO-12 - SD / MISO
GPIO-14 - SD / SCLK
GPIO-16 - SD / CS


Arduino IDE 1.6.8
esp8266 library v2.3.0

you are connecting this way?
my sketch is correct?
User avatar
By Barnabybear
#54855 Hi, this worked for me on the ESP8266-12. I later used GPIO15 (with a pulldown resistor) as CS to free up a GPIO.
Code: Select all/*
  SD card file dump

 This example shows how to read a file from the SD card using the
 SD library and send it over the serial port.

 The circuit:
 * SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 5 // changed from original sketch.

 created  22 December 2010
 by Limor Fried
 modified 9 Apr 2012
 by Tom Igoe

 This example code is in the public domain.

 */

#include <SPI.h>
#include <SD.h>

const int chipSelect = 5;
File dataFile;
 
void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.print("Initializing SD card...");

  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    return;
  }
  Serial.println("card initialized.");
}
void loop() {
//
}