Does anyone have experience modifying libraries (specifically HttpClient) in order to reduce the size of a sketch?
I'm writing a sketch and I want my arduino uno (+plus ethernet/SD card shield) to be able to:
-log data to Cosm
-log data to SD card
-read information from a DHT11 temperature/humidity sensor
-get the current UTC time from an internet server
I've found example codes that do all these things individually, and I verified that in individual sketches each component works. However, when I combine everything together in my master code I get an error saying that my sketch is too big (37.4 kb out of 32.3 kb allowed). I have a few ideas on how to reduce the size of my sketch, but with all the libraries I need to include for the above tasks,
I think it might be better for me to tackle it from that end. The biggest seems to be the HttpClient that is required for the Cosm feature to work properly, with HttpClient.h at 20kb and HttpClient.ccp at 17kb (according to windows explorer).
Could I remove parts of those libraries that Cosm doesn't need to make it smaller? Has anyone tried this before or know what parts I could remove? Or is there another way to upload data to Cosm that doesn't require the HttpClient.h library? Or is it possible to store part of the program or library files on the SD card on the board?
SD.ccp is also large, at 15kb. Do both the .h and .ccp file become part of the final sketch size? I would assume not, since otherwise that would be much more than the 37kb my sketch is currently at, unless it gets compressed during compiling..., so which is more important to focus on?
thank you for any advice or tips!