Page 1 of 1

Code and internal memory

Posted: Tue Sep 03, 2013 6:32 pm
by smadascott
I have read that you should only upload to the internal memory once then make all other changes in the code. Does this mean that I would make a bare bones file that had my basic variables in it and upload that to the internal memory.... then make another file with all my "if" statements and such and upload that to the code part of the controller? Are they two separate sections of the controller? Do they get erased every time new code is uploaded or does the new stuff just add to it?

I have been uploading to internal memory every time I compile a new sketch. It seems like these sketches can get pretty long once you start configuring your features. Any explanation of all this would be very helpful :) I am just trying to understand how to properly organize everything.

Thank you for your time!

Re: Code and internal memory

Posted: Tue Sep 03, 2013 6:46 pm
by lnevo
No there are two different things you are talking about. One is initializing internal memory and the other is using internal memory in the wizard or using it in your code. The first populates the memory variables with the good defaults. After that feel free to read/write the variables and use it in the code. The reason it is sometimes recommended to use hard coded is because it is simpler and easier to troubleshoot.