I have a project that I'm working on that uses several libraries and I'm starting to think that I just need more code space to do what I need to do. I'm trying to use the 32kB on an Arduino Ethernet but I don't think it's cutting it. The Arduino Ethernet is cheap compared to a Mega with Ethernet shield, and I will be producing more than just one of these, so it's important to minimize cost as much as possible. Let me explain in a nutshell what I need the Arduino to do:
-Always keep track of time, syncing with NTP server
-Datalog onto SD card
-Process Data from SD card (area under the curve of particular data points)
-Upload data to COSM
-Utilize one byte of eeprom incase of shutdown event.
I have looked at other sketches that utilize SD and web (SDWebServer) and the sketches are quite small (20kB) for what they do. There may be something I'm overlooking in my code that is making it so high, around 31kB, so let me know if I should post away.
Which libraries are you using - there may be more compact versions (I'm thinking primarily of the SD library here, as
there are several alternative ones around).
Are you aware that constant strings can be moved to PROGMEM which might help (or hinder)?
MarkT - I have some constant strings, but mostly every string is being generated within a subroutine, used, and then thrown away. At least that's what I am hoping it does. =)
I have programs that are over 3,000 lines and only take about 30KB. I included many of my own libs. Compared with my programs your 300 line project is short but takes so much space, must be the libs you used.
If my code gets too long, then I see what I can maybe re-use in another program and just write a library, that way I have it,the code is short, and I don't need to rewrite it.
I don't really have the skill to modify that many libraries because I'm just short on time these days. I would have loved to but it's nice to work with something already made.
Maybe a Mega is worth the money vs. my lack of time to dive into modifying libraries.