Go Down

Topic: Minimum Code to read file from SD (Read 1 time) previous topic - next topic

meetjeremy

Hello All,

I'm working on a project using arduino leonardo.

I have developed the full code which is using the SD card library.

only problem is when i use SD card library my flash memory runs short.

The SD card library is 11612 bytes i size which is almost 40% of the flash memory.

Can somebody give me the minimum code  to read file from SD card FAT32.

I'm using ethernet shield with SD card.

My project, i read configuration variables from sd card, read data from sensors and then send it via ethernet to a server.

Please help.

Thanks
Gabriel Jeremy Jeldo
meetjeremy@gmail.com

CrossRoads

Check out sdfat library instead.
https://code.google.com/p/sdfatlib/
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

PaulS

Quote
The SD card library is 11612 bytes i size

How did you determine this?

Quote
which is almost 40% of the flash memory.

So? Is this some kind of problem?

Quote
Please help.

With what?

Nick_Pyner

I don't think checking the size of the library like that is very useful, and trying to save a few Kb here and there is probably rather futile. You are likely to be a lot better off concluding that the leonardo is simply not up to the job you want to do, and coming forth with the $15 to buy a Mega, which is. You won't be the first to realise the mistake and, if you make any further improvements to your project, it will become more obvious that fixing the mistake at this point in time was a good idea.

If that is too hard to swallow, it might be simpler to revise the job. What you are communicating, and why, is not clear. If it is just data for local consumption, do you need Ethernet to do that?


when i use SD card library my flash memory runs short.

The SD card library is 11612 bytes i size which is almost 40% of the flash memory.

My project, i read configuration variables from sd card, read data from sensors and then send it via ethernet to a server.

rc3105


Check out sdfat library instead.
https://code.google.com/p/sdfatlib/


Thx for a helpful answer instead of idiotic opinions.  sdfat compiles small enough to use in an old 168 or 16a which adds a whopping 69 cents to the project instead of blowing $69 on a mega (or $6 on a 1284 for anyone with two brain cells to rub together)

Go Up