Can someone please explain how the internal memory works? Or share a link to more info.
I see where to modify it but not sure how to use or when to apply it.
Thanks
How Internal Memory Works
14 posts
• Page 1 of 2 • 1, 2
|
|
There are two ways to set parameters. One is in the code. For example:
Sets up a standard light timer on relay #1 that runs from 0900 to 1900 (9,0,19,0). These values are hard coded and cannot be changed without uploading new code. If I wanted my lights to shut off at 8:30 PM, I'd have to change the code to this and re-upload:
The other way to do this is with settings in memory. The equivalent code would be:
This says use the DayLights memory locations to set a timer on relay 1. This is only useful if you're on WiFi and can change the settings remotely with the Portal, U-App, or Android app. The big difference is that you can change memory locations on the fly (using the Portal or an app) without having to upload new code every time you want to change a setting. When you first generate in-the-memory code with the Wizard, it will generate a file to set the memory settings, then it will generate the code that actually runs the controller. You can use the memory settings code, or you can skip it and enter everything into the portal or apps manually. --Colin |
|
If you browse through the internal memory section within the portal you'll see all the values that you can set. For instance you'll see the Heater section has the values for on/off. To make use of those values you'll need to change your code from hard coded to using internal memory. Here is an example of the change:
Before: ReefAngel.StandardHeater(Port1,790,800); After: ReefAngel.StandardHeater(Port1); |
|
ReefAngel.StandardHeater(Port1)
ReefAngel.StandardHeater(Port2) So if you have this.. Two heaters.. Where is the temp value stored? And how do you change them individually? |
|
You cannot change them individually. They will both use the values set in InternalMemory when used that way. You can use the internal thermostat on each one to fine tune it, or control it manually in the code.
|
|
Excellent explanation Colin and Lee. I've always been a bit cloudy on that too.
|
|
How do you enter everything into the portal or apps manually? |
|
On the Portal, click on internal memory. On the U-App, it's under settings.
--Colin |
|
So it's as simple as removing the data from the end of the label and port identification?
|
|
You can see every memory location if you look for the section with mem_ at the beginning of each line in this file
https://github.com/reefangel/Libraries/ ... /Globals.h If you look at https://github.com/reefangel/Libraries/ ... alEEPROM.h You can look for function declarations that end with _read() to see how to get values in your code in the loop if there isn't already a function that uses those values. |
|
14 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 2 guests