Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 2 months ago.
How do you get the SD card configured and working with library
I cannot find any explanation about how to use, i.e. store / read data with, the (micro) SD card with this library.
I am using the library to display text and graphics so it works. Now trying to understanding library code. The first thing that throws me is this:
#ifdef USE_SDCARD SDFileSystem, #endif
what does this mean. So where do I place "USE_SDCARD" in my code.
Then what. What functions are available to write data to the SD card and what functions are available to read from the SD card etc.
Thanks, I very much look forward to the insight.
Question relating to:
1 Answer
9 years, 2 months ago.
section 18 of the 'cookbook' has a lot of explanations re: filesystem(s); a quick scan seemed to answer several of your questions.
Hi, thanks for your feedback. It is appreciated but unfortunately I found it a little too generic. Had a look at section 18 as suggested and it did not answer my question about how this particular library links with SD card functionality. Maybe the answer is... I need to use a separate library (and then section 18 is of interest) but would like that confirmed. There is nothing in this library's (as in Seeed Studio 2.8'' TFT Touch Shield V2.0 library) documentation to suggest what to do.
I suppose I am looking for an answer about how does one get to use "USE_SDCARD" in my code as this library does make reference to one of the libraries stated in section 18 of the cookbook, namely SDFileSystem.
So if I include this Library in my code, how do I then link with the TFT library, re the USE_SDCARD in ifdef.
posted by 18 Jun 2015You're correct - there doesn't seem to be a good 'link'. My take is that Seeed just wanted to define the pin assignments for the SDcard functionality. and leave any/all the coding/libraries up to you; so it looks like the SDFileSystem library is the way to go unless your particular SDcard manufacturer has their own. FWIW to noobs [not you- Gerriko] (I just barely graduated from noob school!) you would need to use a
- define USE_SDCARD in your program - probably before your 'includes'!!!