{"action":"closed","issue":{"url":"https://api.github.com/repos/engineertype/ControLeo2/issues/2","labels_url":"https://api.github.com/repos/engineertype/ControLeo2/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/engineertype/ControLeo2/issues/2/comments","events_url":"https://api.github.com/repos/engineertype/ControLeo2/issues/2/events","html_url":"https://github.com/engineertype/ControLeo2/issues/2","id":116906302,"number":2,"title":"Free up a bunch of SRAM, easily ...","user":{"login":"gruvin","id":7283745,"avatar_url":"https://avatars.githubusercontent.com/u/7283745?v=3","gravatar_id":"","url":"https://api.github.com/users/gruvin","html_url":"https://github.com/gruvin","followers_url":"https://api.github.com/users/gruvin/followers","following_url":"https://api.github.com/users/gruvin/following{/other_user}","gists_url":"https://api.github.com/users/gruvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gruvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruvin/subscriptions","organizations_url":"https://api.github.com/users/gruvin/orgs","repos_url":"https://api.github.com/users/gruvin/repos","events_url":"https://api.github.com/users/gruvin/events{/privacy}","received_events_url":"https://api.github.com/users/gruvin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-14T06:59:39Z","updated_at":"2015-11-24T19:57:01Z","closed_at":"2015-11-24T19:57:01Z","body":"Howdy.\r\n\r\nYou should use Flash memory for all ```Serial.prints``` that only send string constants. Like so ...\r\n\r\nReplace ... \r\n```\r\nSerial.print(\"Last profile loading from eeprom: \");\r\n```\r\n... with ... \r\n```\r\nSerial.print(F(\"Last profile loading from eeprom: \"));\r\n```\r\n\r\n... and similar for the ```MoveToNextPhase(...)``` function, like so ....\r\n\r\n```\r\nMoveToNextPhase(F(\"Max Duration Exceeded\"), timeInPhase);\r\n````\r\n\r\n... and a slight change to the function declaration itself ...\r\n```\r\nvoid MoveToNextPhase(const __FlashStringHelper *reason, int timeInPhase)\r\n{\r\n  Serial.print(\"**\");\r\n  Serial.print(reason);\r\n  ...\r\n```\r\n\r\n... then you will get back 500+ bytes of wasted SRAM, as well lose the Arduino IDE warning about SRAM resources being low and potential instability, yadee yada. \r\n\r\nThen, all that extra RAM could go towards neat new features you add with the 50%+ code space still remaining. Coffee warmer? :-P\r\n\r\nI would have posted a pull request for the above, but I've made a whole bunch of other experimental changes and it's a bit of a mess right now. Anyway, hope it helps.\r\n\r\nHaving fun with my new oven! Thanks for the good works! :-)\r\n\r\nGruvin\r\nWellington, New Zealand\r\n"}}