I have set up my wavemakers so I can set the strength and duration in internal memory. Now im wondering if it would be better to maybe store that in a variable at initialisation and run that through the loop rather than reading the internal memory everytime the loops runs. I imagine it cycles pretty quickly, and may be better read from volatile memory? Or does it not really matter? Heres a snippet of the code I am running. The only downside I can see to reading the memory at initialisation and storing it in a variable is that I would have to reboot the RA for the changes to take place. Any words of wisdom?
Ive also set my skimmer to delay coming on but was wondering if my code after that would overide the delay. I have a few lines that will turn the skimmer off if the float switches in the collection drum activate. Also to turn it off if it is sucking water out of the sump quicker than the ATO can replace it. I need to make sure these three functions work in the correct order I guess.
You can read as much as you want. You can't write though.
Writing is limited to 100000 cycles.
The delay code would be overwriten. I think your best case is to use the masks to overwrite the port to off/on depending on your WL readings.
Like this
ReefAngel.Relay.Override( Skimmer, 0);
Where 0 is off, 1is On and 2 is auto.
OK, came up with this using the override. Im away at the moment and trying to get a few different things done so if someone could check over to make sure it looks sane it would be appreciated. Then hopefully I can upload some cool new features when I get home and it will all work OK.
Take out the else part. Once you trigger the override you would want it to be manual to turn back on. Otherwise once you disconnect your skimmate container the skimmer turns back on getting stuff everywhere otherwise looks good.