Explanation of custom memory options
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Explanation of custom memory options
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...
Explanation of custom memory options
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...
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...
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Explanation of custom memory options
The coding side? How do you define the memory location for custom stuff?
Explanation of custom memory options
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
Lee
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Explanation of custom memory options
Cool. Thanks
Re: Explanation of custom memory options
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:
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.
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();
}
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.