Pages: [1]   Go Down
Author Topic: Minimum Code to read file from SD  (Read 985 times)
0 Members and 1 Guest are viewing this topic.
Bangalore, India
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Arduino Serial Communication
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Gabriel Jeremy Jeldo
meetjeremy@gmail.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 653
Posts: 50904
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2312
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

central Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Riley
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Pages: [1]   Go Up
Jump to: