I was always unhappy that just importing my Arduino Audio Tools library was using quite some PROGMEM and RAM even with an empty sketch:


Sketch uses 888547 bytes (67%) of program storage space. Maximum is 1310720 bytes.
Global variables use 43352 bytes (13%) of dynamic memory, leaving 284328 bytes for local variables. Maximum is 327680 bytes.

The root cause for this was that I considered networking to be part of the core functionality that should be available w/o any additional includes, so it was always including “WiFi.h” which was the culprit.

I finally decided to move the networking out of the core and make it available on demand only. In the new 1.2.0 release the available memory after just importing AudioTools.h is now as follows


Sketch uses 281671 bytes (21%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20768 bytes (6%) of dynamic memory, leaving 306912 bytes for local variables. Maximum is 327680 bytes.

So compared with an empty sketch, including this library only uses 20 bytes of additinal PROGMEM and 8 bytes of dynamic memory: This is quite an improvement!

As a consequence we can use the A2DP library now even with the restrictive default Partition Scheme.

You can still use the URLStream, ICYStream and Server classes, by just using an additional include:


#include "AudioTools.h"
#include "AudioTools/Communication/AudioHttp.h"

Further information about the new 1.2.0 release can be found here.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *