{"id":290,"date":"2018-06-05T18:58:16","date_gmt":"2018-06-05T18:58:16","guid":{"rendered":"https:\/\/arduino-developer.com\/arduino\/?p=290"},"modified":"2018-11-13T16:27:54","modified_gmt":"2018-11-13T16:27:54","slug":"increasing-available-memory","status":"publish","type":"post","link":"https:\/\/arduino-developer.com\/arduino\/programming\/memory\/increasing-available-memory","title":{"rendered":"Increasing available memory"},"content":{"rendered":"<h4>\nTo increase available RAM<br \/>\n<\/h4>\n<h5>\nMove constants to program memory instead of RAM<br \/>\n<\/h5>\n<p>\nUse the F macro to move string literals to program memory. Serial.print(&quot;some string&quot;) is stored in RAM (dynamic memory), Serial.print(F(&quot;some string literal&quot;) is stored in program memory. Any function that uses the print class functions can use the F macro (e.g.client.print).\n<\/p>\n<h5>\nAvoid long &quot;switch&quot; statements<br \/>\n<\/h5>\n<p>\nSwitch statements use RAM for the Arduino believe it or not, replace any big ones with if else statements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To increase available RAM Move constants to program memory instead of RAM Use the F macro to move string literals to program memory. Serial.print(&quot;some string&quot;) is stored in RAM (dynamic memory), Serial.print(F(&quot;some string literal&quot;) is stored in program memory. Any function that uses the print class functions can use the F macro (e.g.client.print). Avoid long [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-memory"],"_links":{"self":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":3,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/290\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}