{"action":"created","issue":{"url":"https://api.github.com/repos/Arduboy/Arduboy/issues/99","repository_url":"https://api.github.com/repos/Arduboy/Arduboy","labels_url":"https://api.github.com/repos/Arduboy/Arduboy/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/Arduboy/Arduboy/issues/99/comments","events_url":"https://api.github.com/repos/Arduboy/Arduboy/issues/99/events","html_url":"https://github.com/Arduboy/Arduboy/issues/99","id":134901332,"number":99,"title":"Rename beginNoLogo() and have it free up as much as possible","user":{"login":"MLXXXp","id":8151717,"avatar_url":"https://avatars.githubusercontent.com/u/8151717?v=3","gravatar_id":"","url":"https://api.github.com/users/MLXXXp","html_url":"https://github.com/MLXXXp","followers_url":"https://api.github.com/users/MLXXXp/followers","following_url":"https://api.github.com/users/MLXXXp/following{/other_user}","gists_url":"https://api.github.com/users/MLXXXp/gists{/gist_id}","starred_url":"https://api.github.com/users/MLXXXp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MLXXXp/subscriptions","organizations_url":"https://api.github.com/users/MLXXXp/orgs","repos_url":"https://api.github.com/users/MLXXXp/repos","events_url":"https://api.github.com/users/MLXXXp/events{/privacy}","received_events_url":"https://api.github.com/users/MLXXXp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-19T16:04:09Z","updated_at":"2016-02-20T03:29:34Z","closed_at":null,"body":"I propose that we rename function *beginNoLogo()* to something like *beginNoFrills()* and have it free up even more memory for the sketch, while making things more \"future proof\".\r\n\r\nIn addition to the boot logo, we've added a \"flashlight\"  feature within the *begin()* function. Like the boot logo, the flashlight will use some code space that a large sketch may wish to recover.\r\n\r\nI've recently proposed a \"system control\" feature as issue #81 that, if implemented, would also use up some code. I tried to minimise code impact but @yyyc514 has suggested it include basic visual feedback, which could use a fair bit more code space than my original technique. In the future, there could also be other \"frills\" added that a developer may wish to suppress, if absolutely necessary, to free up code space for use by the sketch.\r\n\r\nWe could create a whole bunch of *begin...()* functions to suppress various features E.g. *beginNoLogo()*, *beginNoFlashlight()*, *beginNoSysControl()*, *beginNoLogoAndFlashlight()*, *beginNoLogoAndSysControl()* but the number of functions required to support all combinations is unwieldy and could become more so as features are added.\r\n\r\nInstead, why not have just *beginNoFrills()* which leaves out all of these types of features, both current and future ones if possible. We would then strive to make functions for these features public and callable immediately after *beginNoFrills()*.\r\n\r\nSo, a sketch using *beginNoFrills()* would start out with maximum memory available and then could pick and chose which \"frills\" to add back in, space permitting.\r\n\r\nWe would strongly recommend that a sketch use *begin()* unless space became tight. We could provide a commented template, and/or an example sketch, that could be cut and pasted in place of *begin()*:\r\n```cpp\r\n  beginNoFrills(); // use in place of begin to free up maximum memory\r\n\r\n  // Each of the following can be commented out or removed to suppress the\r\n  // feature and free up some memory.\r\n  bootLogo(); // Displays the animated Arduboy logo on start up\r\n  bootFlashlight(); // Turns on the RGB LED bright white if the UP button is held during start up\r\n  bootSysControl(); // Allows control of audio mute and screen brightness if the B button is held during start up  \r\n```\r\nThere could be a problem with features that require they be called before some other required internal code in the *begin* sequence, but I don't think this is currently the case. I don't believe there's a problem with doing the audio set up before doing the above features."},"comment":{"url":"https://api.github.com/repos/Arduboy/Arduboy/issues/comments/186497444","html_url":"https://github.com/Arduboy/Arduboy/issues/99#issuecomment-186497444","issue_url":"https://api.github.com/repos/Arduboy/Arduboy/issues/99","id":186497444,"user":{"login":"yyyc514","id":6473,"avatar_url":"https://avatars.githubusercontent.com/u/6473?v=3","gravatar_id":"","url":"https://api.github.com/users/yyyc514","html_url":"https://github.com/yyyc514","followers_url":"https://api.github.com/users/yyyc514/followers","following_url":"https://api.github.com/users/yyyc514/following{/other_user}","gists_url":"https://api.github.com/users/yyyc514/gists{/gist_id}","starred_url":"https://api.github.com/users/yyyc514/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyyc514/subscriptions","organizations_url":"https://api.github.com/users/yyyc514/orgs","repos_url":"https://api.github.com/users/yyyc514/repos","events_url":"https://api.github.com/users/yyyc514/events{/privacy}","received_events_url":"https://api.github.com/users/yyyc514/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T03:29:34Z","updated_at":"2016-02-20T03:29:34Z","body":"> We would put it in the library extras folder and the developer would be instructed to copy it into their sketch's folder and edit it as desired. \r\n\r\nIs that even a possibility?  I'd think both would be found and compiled resulting in dup symbol errors - no?"}}