Hi. I'm working on a sensor logger program with a webserver built in. I managed to have the logging function when I wasn't using these lines:
if (!card.init(SPI_FULL_SPEED, CS_SD)) Serial.println("card.init failed!");
if (!volume.init(&card)) Serial.println("vol.init failed!");
if (!root.openRoot(&volume)) Serial.println("openRoot failed");
in the setup to open the volume so the webserver part could access files. As soon as I put them in this part fails to open the file:
logfile.open(name, ios::out | ios::app);
if (!logfile.is_open()) Serial.println("file.open");
See the full pastebin here: #include <istream.h>#include <SdVolume.h>#include <SdInfo.h>#include <SdFa - Pastebin.com
The tutorial I'm basing the webserver part on is from here: Arduino Tutorials - Ethernet+SD
Any suggestions as to where I'm going wrong? Thanks,
David