![]() ![]() It's a tricky balance to strike that tends to come with practice. However, be aware that sometimes trying to make code too reusable actually ends up making it more verbose. You may be able to condense them into reusable functions which can be called from multiple places. Sometimes it's also helpful to identify where multiple parts of your code are the same (or very similar). Unfortunately, there's no 'magic bullet' approach which will work for all situations, although it helps if you consider seriously what your sketch really needs to have. In terms of reducing program space (Flash) usage, the code size can be quite difficult to optimise if you're inexperienced, or if you're more used to programming for desktop computers which don't tend to need that skill. That means the very first thing to do if you run out of space is to look at what parts of your code you can optimise. Efficiency (in terms of speed and space) is far more important because resources are at a premium. ![]() Low-level programming for embedded systems is quite different from programming for general purpose devices, such as computers and cell phones.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |