So, I have a fairly complicated project that is utilizing the new Ethernet shield with the sdfat library (For the built in SD card functionaity) as well as the standard ethernet library, TIE, and UDPBytewise among others. My list of incudes is as follows (using version 0020):
Everything works fine, but when I make FreeRam() calls, I notice that my RAM is down around 400 bytes. As soon as I open up a SD card file, by RAM drops dangerously low to around 150 bytes and sometimes hangs or reboots automatically (Weird behavior). As I have been trying to add functionality to my application, it often runs out of RAM, and then I have to spend up to several hours trying to optimize to squeak every last drop out of the built in RAM. For larger applications it would seem that the 2k just doesn’t cut it. As I am trying to build a low cost device, the Arduino MEGA is a steep double the cost of the UNO, so I am trying to make it work without upgrading. Not to mention the form factor is a little large on the mega for my purposes. If I must, then I probably will, but I’m hoping to find something in between the two.
Does anyone have any thoughts about how I may be able to get a little more RAM? Even 3k or 4k would definitely do the trick, but my application requires some buffers for reading in HTML from the SD card, and doing comparisons which are eating up the RAM, and there really seems to be no way to shorten them any more than I have. The libraries seem to be devouring most of it, since if I do a FreeRam() call immediately after boot, I have only about 400 bytes left. This is while the unit is idle in webserver mode waiting for connections.
Any thoughts would be appreciated!