{"id":6810,"date":"2025-09-23T18:19:34","date_gmt":"2025-09-23T16:19:34","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=6810"},"modified":"2025-09-23T18:25:22","modified_gmt":"2025-09-23T16:25:22","slug":"arduino-audio-tools-using-less-memory","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/","title":{"rendered":"Arduino Audio Tools is using less memory"},"content":{"rendered":"<p>I was always unhappy that just importing my <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\">Arduino Audio Tools<\/a> library was using quite some PROGMEM and RAM even with an empty sketch:<\/p>\n<p><code><br \/>\nSketch uses 888547 bytes (67%) of program storage space. Maximum is 1310720 bytes.<br \/>\nGlobal variables use 43352 bytes (13%) of dynamic memory, leaving 284328 bytes for local variables. Maximum is 327680 bytes.<br \/>\n<\/code><\/p>\n<p>The root cause for this was that I considered networking to be part of the <strong>core functionality<\/strong> that should be available w\/o any additional includes, so it was always including <strong>&#8220;WiFi.h&#8221; which was the culprit<\/strong>.<\/p>\n<p>I finally decided to move the <strong>networking out of the core and make it available on demand only<\/strong>. In the <strong>new 1.2.0 release<\/strong> the available memory after just importing AudioTools.h is now as follows<\/p>\n<p><code><br \/>\nSketch uses 281671 bytes (21%) of program storage space. Maximum is 1310720 bytes.<br \/>\nGlobal variables use 20768 bytes (6%) of dynamic memory, leaving 306912 bytes for local variables. Maximum is 327680 bytes.<br \/>\n<\/code><\/p>\n<p>So compared with an empty sketch, including this library only uses 20 bytes of additinal PROGMEM and 8 bytes of dynamic memory: <strong>This is quite an improvement<\/strong>!<\/p>\n<p>As a consequence we can use the A2DP library now even with the restrictive default Partition Scheme.<\/p>\n<p>You can still use the URLStream, ICYStream and Server classes, by just using an additional include:<\/p>\n<p><code><br \/>\n#include \"AudioTools.h\"<br \/>\n#include \"AudioTools\/Communication\/AudioHttp.h\"<br \/>\n<\/code><\/p>\n<p><strong>Further information<\/strong> about the new <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/releases\/tag\/v1.2.0\">1.2.0 release can be found here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,22],"tags":[],"class_list":["post-6810","post","type-post","status-publish","format-standard","hentry","category-arduino","category-machine-sound"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino Audio Tools is using less memory - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Audio Tools is using less memory - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-23T16:19:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-23T16:25:22+00:00\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Arduino Audio Tools is using less memory\",\"datePublished\":\"2025-09-23T16:19:34+00:00\",\"dateModified\":\"2025-09-23T16:25:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/\"},\"wordCount\":171,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/\",\"name\":\"Arduino Audio Tools is using less memory - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"datePublished\":\"2025-09-23T16:19:34+00:00\",\"dateModified\":\"2025-09-23T16:25:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/23\\\/arduino-audio-tools-using-less-memory\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Audio Tools is using less memory\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Audio Tools is using less memory - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Audio Tools is using less memory - Phil Schatzmann","og_description":"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 [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/","og_site_name":"Phil Schatzmann","article_published_time":"2025-09-23T16:19:34+00:00","article_modified_time":"2025-09-23T16:25:22+00:00","author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Arduino Audio Tools is using less memory","datePublished":"2025-09-23T16:19:34+00:00","dateModified":"2025-09-23T16:25:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/"},"wordCount":171,"commentCount":1,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/","url":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/","name":"Arduino Audio Tools is using less memory - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"datePublished":"2025-09-23T16:19:34+00:00","dateModified":"2025-09-23T16:25:22+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/23\/arduino-audio-tools-using-less-memory\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Arduino Audio Tools is using less memory"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=6810"}],"version-history":[{"count":7,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6810\/revisions"}],"predecessor-version":[{"id":6817,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6810\/revisions\/6817"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=6810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=6810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=6810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}