Closed hmronline closed 4 years ago
Thank you for reporting this. There are 2 problems:
char buffer[600] = {0}; // it will fill it all with 0's
or alternatively, you could use the return of readBytes to terminate the string at the right place directly like:
int i = objFile.readBytes(buffer, sizeof(buffer));
buffer[i] = 0;
I think it could be good idea to supply the file character by character, this way there's not need for using a buffer at all, I added example like this: https://github.com/michalmonday/CSV-Parser-for-Arduino/blob/master/examples/reading_from_sd_card/reading_from_sd_card.ino
Hi Michal, thank you for your prompt response!
I've tested the new version and I can confirm it now works properly following the new example code.
I'm having issues to read a csv file from sdcard in chunks; it randomly fails to parse file, using the following code:
I have verified that everything works fine if csv file contents is provided all at once as first argument to csvParser.
Could you please tell the appropriate method to read csv chunks from sdcard ?
This could possible be included in the provided example to help others that may experience the same challenge.
Thanks in advance! Hernán.-