Explanation of custom memory options

Basic / Standard Reef Angel hardware
Post Reply
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Explanation of custom memory options

Post by DrewPalmer04 »

Could someone explain to me what the purpose of custom memory locations are... Also ideas of what everyone is doing with them. I use the iPhone app a lot and would like to utilize custom memory locations through the app. Granted I just need to figure out the possibilities/options of what I can do. You guys know a lot about my set up/equip already...
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Explanation of custom memory options

Post by lnevo »

The iphone app kinda bombs out on using memory locations. I just use the http interface to read/modify memory variables.

I use one to trigger my ato filling routine. Another for vacation mode (top off for my top off..) and the last one I use is for my acclimation timer (scales down my light schedule over x number of days) this one I need memory for to ensure it doesnt get lose after controller restarts...
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Explanation of custom memory options

Post by DrewPalmer04 »

The coding side? How do you define the memory location for custom stuff?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Explanation of custom memory options

Post by lnevo »

You just use the internalmemory read/write functions... As far as defining them,that is optional..you can use a variable, a #define, or static number. I'm using 100-103 right now..you can check my code (link in sig) for my usage...

Lee
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Explanation of custom memory options

Post by DrewPalmer04 »

Cool. Thanks
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Explanation of custom memory options

Post by binder »

Yeah, you simply just pick a location to start using. It's advisable to use locations below 200. 200 is where the built-in memory locations start. If you pull up Globals.h, you can find a list of the locations (or just pull up the Status App and look under the Memory locations window).
You can do something like this as far as coding goes:

Code: Select all

if (InternalMemory.read(100) == 1) {
  // do something here when the value stored is 1
  StartFeedingMode();
} else {
  Stop FeedingMode();
}
Or whatever else you wanted to do. If you had an auto water change setup going, you could monitor a memory location and have it check for a certain value. If that value was set, then it starts the water change for you.
You could even use the locations for custom timers. If you had an autofeeder that needed to read how long to run for, you could setup a location to store the value for a timer (like we do for the feeding mode timers).
Then, you could do stuff like Lee was talking about too.
Post Reply