Opening a SD Card for Read/Write
good day,
i'm having problem opening sd card. think i'm doing wrong.
is datatype? first part works fine.
i have snippet of code have been using below testing.
thanks
randy
i'm having problem opening sd card. think i'm doing wrong.
is datatype? first part works fine.
i have snippet of code have been using below testing.
thanks
randy
code: [select]
string test = "";
if (file == 0)
{
strcpy_p(prog_buffer, (char*)pgm_read_word(&(string_table[4])));
upcfile = sd.open(prog_buffer, file_write);
}
else
{
test = getseq(seq) + ".txt";
serial.println(test);
upcfile = sd.open(test, file_write); // error here. because "test" string?
}
quote
error here. because "test" string?
no. error there because test string, not string.
there no reason test string. make string (a null terminated array of chars) , work.
use sprintf() populate array.
Arduino Forum > Using Arduino > Storage > Opening a SD Card for Read/Write
arduino
Comments
Post a Comment