user85199: I have a ATMEGA328 with ESP826 (like this http://arduinolearning.com/hardware/atmega328-esp8266-arduino-board.php) and can successfully send information from the ATMEGA328 to the ESP826 via serial.
I can also record information from the ATMEGA328 to SD card.
What I would like to do is read data from the SD card with the ESP826 so I can upload it to a server..
When I try to connect directly:
#include <ESP8266WiFi.h>
#include <SPI.h>
#include <SD.h>

File myFile;

void setup() {
  Serial.begin(115200);
  delay(10);

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

  if (!SD.begin(10)) {
    Serial.println("initialization failed!");
    return;
  }

  myFile = SD.open("/");

  printDirectory(myFile, 0);

  Serial.println("done!");
  
}

void loop(){
}


void printDirectory(File dir, int numTabs) {
  while (true) {

    File entry =  dir.openNextFile();
    if (! entry) {
      // no more files
      break;
    }
    for (uint8_t i = 0; i < numTabs; i++) {
      Serial.print('\t');
    }
    Serial.print(entry.name());
    if (entry.isDirectory()) {
      Serial.println("/");
      printDirectory(entry, numTabs + 1);
    } else {
      // files have sizes, directories do not
      Serial.print("\t\t");
      Serial.println(entry.size(), DEC);
    }
    entry.close();
  }
}

It doesn't find the card. This is regardless of whether I have pins 1&2 ON or not.
Is there any way to write to the SD card using the ATMEGA328 and read that from the ESP826 (to send the files to the cloud)?

user4143: You can't. There's no connection between the ESP8266 and the SD card.
However you can program the ATMega328 to read the SD card then send that data to the ESP8266 for forwarding to the internet.

85199: <p>I have a ATMEGA328 with ESP826 (like this <a href="http://arduinolearning.com/hardware/atmega328-esp8266-arduino-board.php" rel="nofollow noreferrer">http://arduinolearning.com/hardware/atmega328-esp8266-arduino-board.php</a>) and can successfully send information from the ATMEGA328 to the ESP826 via serial.
I can also record information from the ATMEGA328 to SD card.
What I would like to do is read data from the SD card with the ESP826 so I can upload it to a server..</p>
<p>When I try to connect directly:</p>
<pre><code>#include &lt;ESP8266WiFi.h&gt;
#include &lt;SPI.h&gt;
#include &lt;SD.h&gt;

File myFile;

void setup() {
  Serial.begin(115200);
  delay(10);

  Serial.print(&quot;Initializing SD card...&quot;);

  if (!SD.begin(10)) {
    Serial.println(&quot;initialization failed!&quot;);
    return;
  }

  myFile = SD.open(&quot;/&quot;);

  printDirectory(myFile, 0);

  Serial.println(&quot;done!&quot;);
  
}

void loop(){
}


void printDirectory(File dir, int numTabs) {
  while (true) {

    File entry =  dir.openNextFile();
    if (! entry) {
      // no more files
      break;
    }
    for (uint8_t i = 0; i &lt; numTabs; i++) {
      Serial.print('\t');
    }
    Serial.print(entry.name());
    if (entry.isDirectory()) {
      Serial.println(&quot;/&quot;);
      printDirectory(entry, numTabs + 1);
    } else {
      // files have sizes, directories do not
      Serial.print(&quot;\t\t&quot;);
      Serial.println(entry.size(), DEC);
    }
    entry.close();
  }
}
</code></pre>
<p>It doesn't find the card. This is regardless of whether I have pins 1&amp;2 ON or not.</p>
<p>Is there any way to write to the SD card using the ATMEGA328 and read that from the ESP826 (to send the files to the cloud)?</p>
 4143: <p>You can't. There's no connection between the ESP8266 and the SD card.</p>
<p>However you can program the ATMega328 to read the SD card then send that data to the ESP8266 for forwarding to the internet.</p>
