[Solved] SdFat Library Compilation Error on CT-ARM

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

[Solved] SdFat Library Compilation Error on CT-ARM

Postby JayJoe » Wed Jan 03, 2018 5:23 pm

Hi,

I wish to use this library for my CT-ARM project too. But unfortunately, it has compilation error too. The sketch I am using is dataLogger, can be found in the 'examples' folder.

This library is better than SD.h in data logging, I am sure by making SdFat.h available for CT-ARM will be beneficial to others too :D

Looking forward. Thanks.

https://github.com/greiman/SdFat
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: SdFat Library Compilation Error on CT-ARM

Postby bengchet » Thu Jan 04, 2018 4:56 pm

Hi,

You don't need to install extra SdFat library. CT-ARM has already included the SdFat library which have been tested working and compiled successfully with. The latest SdFat library might have some changes to work with other compatible boards so might not work well with CT-ARM( added new functions etc)

Try remove the SDFat library, or move the library to other place temporary from Arduino Library folder.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: SdFat Library Compilation Error on CT-ARM

Postby JayJoe » Thu Jan 04, 2018 5:10 pm

Hi,

Found. Thank you :)
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: SdFat Library Compilation Error on CT-ARM

Postby JayJoe » Sun Jan 07, 2018 1:55 am

Hi, I have another problem.

I will need to use testGetline() function from getline.ino, and implement into my project. I notice that the compilation of getline.ino already comsumes 76% of dynamic memory. And after combining the testGetline() function with my project's coding, as expected, it shows compilation error.

Is it possible to reduce the consumption in this case? :|
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: SdFat Library Compilation Error on CT-ARM

Postby JayJoe » Mon Jan 08, 2018 12:31 pm

UPDATES

solved by doing so

CODE: SELECT_ALL_CODE
int getTotalLines()
{
  String buffer;
  unsigned int line_number = 0;

  myFile = sd.open(fileName);

  while(myFile.available())
  {
    buffer = myFile.readStringUntil('\n');
    line_number++;
  }
 
  myFile.close();
  return line_number;
}
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: SdFat Library Compilation Error on CT-ARM

Postby bengchet » Tue Jan 09, 2018 10:36 am

Hi,

Yes, should be simple as that. Well done! ;)
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: SdFat Library Compilation Error on CT-ARM

Postby JayJoe » Wed Jan 10, 2018 10:07 pm

thanks to u bengchet, i appreciate :)
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 2 guests

cron