Out Of Memory :((

Binary sketch size: 19578 bytes (of a 32256 byte maximum)

(Working sketch BEFORE I add SD.h and (un-rem out the code that stops it from uploading, due to memory constraints)

My idea (place all the html, help commands etc onto the SD card, to "free up memory") but lol, the catch is, when i do
add SD.h my sketch size jumps from 19k to 30k (of 32k? in theory it should work, but no..) so i removed the code and put
it back to how it was (which works fine).

Bugger, is all i have to say :frowning: without the SD lib, what the attached code does is a few things, it has a bluetooth module (myserial)
it also has ethernet support (to control from the webpage), it also connects to my machine to control it bt > arduino > ethernet > pc ...


Any hacks, all i need to do is read the data and write data, i'm not interested in any kind of file server, just to log/read. any thoughts
or suggestions? cheers.

files on sd card (that are accessible)

test.html //was going to serve a webpage as a test :frowning:

void DumpFileToBT(char fn[])
void DumpFileToEth(char fn[], EthernetClient Serverclient)
void WriteToFile(char fn[], char what[])


WebServer.ino (12.1 KB)

Time for a '1284 based board. 16K SRAM, 128K Flash.
Handy with a soldering iron? I sell these bare boards for $4.50 mailed to you.
Cross Roads Electronics for the PL

Space on the lower right provides couple of options for USB/Serial interace.
Attach an FTDI Basic, FTDI cable, connect a CP2102 module (modified with DTR jumper) or mount a Mikroelectronika Mikroe483 from mouser $11

ohhh nice.... very nice...

I'll follow you up on that offer :slight_smile: (but before i invest time on that project, i've got a few other things "people" want me to make lol)

So in a couple of weeks, probably expect an Instant Message from me :slight_smile: thanks.... also it's good to know that this can be done, i was wondering how
to boost ram, i was even looking at old old ram chips wondering if i could somehow "add extra" memory , but I guess this is the best way, less trouble it's all onboard.

Thanks for the info and offer :slight_smile:

Here are some more ideas:

it still uses a lot of memory, but not as much as SD.h

If this does not work and you only need to read files from sdcard, try petit fat file lib, which
will only add about 4K of flash rom:


Cool, i'll have a play with that code, looks useful :slight_smile: - but lol, 4k is a lot of Text Strings lol, if i go over 4k of text strings, i'll swap over, until then i might as well wait and trying with a more powerful atmega processor to do the job, the arduino mega boards seems a little overkill for what i need right now....

cheers folks.

Yes, the 1284's seem a great in between chip. 32 IO vs 20 when you don't need 69, 16K of SRAM (Mega only has 8K). Dual hardware serial ports.
You can put my board together for $15-20 depending on what you have to buy new and what you have on hand, vs $55 for a mega.