Code and internal memory

New members questions
Post Reply
smadascott
Posts: 14
Joined: Sat Aug 24, 2013 10:12 pm
Location: Arizona
Contact:

Code and internal memory

Post 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!
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Code and internal memory

Post 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.
Post Reply