Explain internal memory

Basic / Standard Reef Angel hardware

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Wed Jan 18, 2017 6:54 pm
Hello everybody,
could someone please explain in simple terms the internal memory?
I have been uploading the newbee way from the wizard. I would like to try internal memory. I know you can change the variables from your iPhone or web portal using internal memory, but how do I code for it? leave all variables out?

Just a tad clueless.

Thanks,
-James-

Image

Posts: 31
Joined: Thu Nov 24, 2016 7:19 am
PostPosted: Wed Jan 18, 2017 9:03 pm
I'm pretty new myself. Been up and running about a month freshwater so not as complicated but doing some things similarly. But to take a stab at your question that is exactly what I found and am doing. Here is a link to a great overview someone did that helped me out tremendously. He answers your question in part two. Btw noticed from banner you have a water level. If true be certain to use some silicone or something to seal around the hose I didn't and fought slow leaks until I did now the reading is rock solid.

viewtopic.php?f=14&t=3353

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Thu Jan 19, 2017 8:01 am
Thanks, that helped some.
I have coded some before using the Arduino and Particle Photon boards. It is the internal memory concept that is foggy to me.
I do not use a water level but I will keep that in mind for the future.

Still open for more explanations. :-)
-James-

Image

Posts: 11969
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Thu Jan 19, 2017 12:03 pm
Internal memory will let you adjust settings without having to upload a new code to the controller.
Code: Select all
ReefAngel.StandardHeater( T1_PROBE,Port5,735,780 );

For example, in this code above, the heater is set to 73.5 and 78.0.
If you decided to change the temperature you want the heater to operate, you would have to edit the code and upload to the controller again.
Code: Select all
ReefAngel.StandardHeater( Port5 );

The code above would use settings store in internal memory, which does not get erased on power loss, to operate the heater. So, if you have 73.5 and 78.0 stored in the internal memory and decided to change the upper temperature to 77.0, you can simply change the internal memory value from 78.0 to 77.0 and the controller would do its thing and you don't need to upload any code.
Roberto.

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Sat Jan 21, 2017 11:39 am
Ok, I get that.
Question, do I have to initialize the internal memory or is it already setup? I found the initialInternalmemory example in the Arduino program that made me think about it.
Once internal memory is loaded, can I still load hardcoded files or do I have to use the wizard and only write code for internal memory?
-James-

Image
User avatar
Posts: 2651
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Jan 21, 2017 2:09 pm
GermanDude wrote:Ok, I get that.
Question, do I have to initialize the internal memory or is it already setup? I found the initialInternalmemory example in the Arduino program that made me think about it.
Yes, you must initialize the internal memory with the values you want to use before you load your regular code. Otherwise if you load the code that uses the internal memory, you will get erratic or strange behavior because the code will use whatever was in the memory.
Once internal memory is loaded, can I still load hardcoded files or do I have to use the wizard and only write code for internal memory?
You do not always have to use internal memory in your code. You are free to use internal memory or hard coded values. Sometimes, you know you will always use a specific value for something. That is fine, just hard code it. Otherwise, if you use internal memory, you will have the capability of changing the value without having to reload your code.

Bottom line is this. Internal memory gives you the ability to change values/ranges/etc on the controller without having to reload your code. So it could be a benefit for you. Most people use internal memory.

Some people who are trying to "dial in" a specific value or frequency will use internal memory because they can change the values on-the-fly. If they did not, they would have to edit the code and upload a new code each time they make a small change. Which can be a big pain in the butt if you don't know exactly what values you need to use.

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Sat Jan 21, 2017 2:21 pm
So, I already have a hardcoded program running that I created with the webwizard. What happens if I load the initialinternalmemory from the arduino program? Will it wipe the screen setup and all my existing code?
I am wondering if not initializung the internal memory has anything to do with the RA+ rebooting when I try to use the webased Uapp? I have been working with Robert on that issue and he has not been able to duplicate it on his end. See the cloud wifi rebooting thread I started.
Or maybe I am way of base. :-)
-James-

Image

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Sat Jan 21, 2017 2:28 pm
When I first received the RA+ and the wifi cloud module I setup the wifi cloud using the webwizard with no problem.
I then used the webwizard to write my first setup and it did change the way the screen looks. Better actually.
The underlying menus you get when you push the joystick down stayed the same.
Was that the correct way to get started? Everything is running fine. I have since changed my code a few times and uploaded.
The only issue I have is the rebooting with the web based Uapp.
-James-

Image
User avatar
Posts: 2651
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Jan 21, 2017 6:29 pm
GermanDude wrote:So, I already have a hardcoded program running that I created with the webwizard. What happens if I load the initialinternalmemory from the arduino program? Will it wipe the screen setup and all my existing code?
I am wondering if not initializung the internal memory has anything to do with the RA+ rebooting when I try to use the webased Uapp? I have been working with Robert on that issue and he has not been able to duplicate it on his end. See the cloud wifi rebooting thread I started.
Or maybe I am way of base. :-)


Yes, anytime you load the initialinternalmemory onto the controller, it will erase your code that is running. You typically only load the initialinternalmemory once. After you have all the memory locations initialized, then you can update them from portal or one of the smart phone apps.

I'm not sure if not initializing the memory has anything to do with the rebooting when using the uapp. It might depending on if the uapp depends on reading a memory value and it gets an erroneous value instead. However, I do not believe this to be the case. You could load the initialinternalmemory pde file and then load your code back onto the controller to test though.

When I first received the RA+ and the wifi cloud module I setup the wifi cloud using the webwizard with no problem.
I then used the webwizard to write my first setup and it did change the way the screen looks. Better actually.
The underlying menus you get when you push the joystick down stayed the same.
Was that the correct way to get started? Everything is running fine. I have since changed my code a few times and uploaded.
The only issue I have is the rebooting with the web based Uapp.

That sounds like you did things properly. I know when you use the wizard to create your code, it walks you through what you are supposed to do. I know it loads the internal memory initialization and then has you load your code. So the process is combined. As long as you followed with what the wizard said and your controller is/was operational, then you did things properly.
I am puzzled with what is going on with the uapp. There is the possibility that it could be something related to the wifi cloud module. I am not familiar with the wifi cloud module and how it works (I just haven't bothered looking into it yet). So I am unable to comment on it.
There could be multiple things that could be causing the rebooting problem unfortunately.

Posts: 79
Joined: Tue Dec 27, 2016 6:26 am
Location: Jacksonville,FL
PostPosted: Sun Jan 22, 2017 9:52 am
Yes, the controller is setup correctly,I agree. I can store variables (like temp or port delay) in internal memory.
My hard coded settings however will override my settings during each void loop I assume. So best practice would be to leave the hard-coded settings like temp,delay,feeding timer out of the code, correct?
So far I am only using the portal and Dave Molton`s application to change my internal settings.
-James-

Image
Next

Return to Standard

Who is online

Users browsing this forum: vonjankmon and 1 guest