Error opening log.csv - linked to array of files?


hi all,

i'm having issues datalogging. i'm building on this older thread. created array of files , want open these files write on them. however, error opening file. don't know if because supposed use array of pointers files instead of array of files, or if due name of file, or due other issue.  made sure filenames short (less 8 characters) , contained letters , numbers. here code snippet (within loop() function , within state):

code: [select]
file filepointers[celln]; //array of 4 files, 1 each cell
char filename_cell[32];
char completefilename_cell[40];
sprintf (filename_cell, "s%02ic%02i.csv", nn, thiscell + 1); //create filename
sprintf (completefilename_cell, "%s/%s/%s", foldername, datafoldername, filename_cell); //this uses made foldernames , gives: /201216/data/s01c01.csv
filepointers[thiscell] = sd.open(completefilename_cell, "r");

if (filepointers[thiscell]) {
//write stuff
}
else {
    serial.println("error opening log.csv"); // error pops up!
}



any clue should solve this?

yes.
add line:
code: [select]

    serial.println(completefilename_cell);

prove sprint() doing think it's doing when building completefilename_cell.


Arduino Forum > Using Arduino > Programming Questions > Error opening log.csv - linked to array of files?


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor