Memory Usage

From IoT with AME
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Software Problems

Memory Usage

Talking to the ESP8266, dealing with its quirks, and putting a MQTT client on top easily consumes half of the 32kB of program memory and half of the 2kB data memory normal Arduinos have to offer.

I first tried to let the air out of the PubSubClient and ESP8266Client libraries, succeeded to a degree, and then decided to write my own MQTT- and ESP8266 libs, designed to rely on streaming as much as possible and to reduce the use of buffers to a few and small occasions, and make use of more compact and readable code.

Software Problems