Seeed-Studio / GPRS_SIM900

library for GPRS shield with sim900 module.
MIT License
138 stars 96 forks source link

Low memory on Atmega328P #12

Closed DangerD256 closed 7 years ago

DangerD256 commented 7 years ago

Hi, loaded an example GPRS_TCPConnection and for Atmega328P got this warning: Global variables use 1,816 bytes (88%) of dynamic memory, leaving 232 bytes for local variables. Maximum is 2,048 bytes. Low memory available, stability problems may occur.

So i can't use other libraries due to low memory issue...

Can i change char buffer[512]; for example to char buffer[64]; ? Will it work ok? With char buffer[64]; i got 66% of usage... but it still a lot of, what else i can change in library?

ortegafernando commented 7 years ago

Yes, you can change buffer, depends on what web page are you trying to read.

You can also NOT to use Serial or change for example:

Serial.print("IP Address is ");

to

Serial.print(F("IP Address is "));