Page 1 of 1

internal memory

Posted: Thu Nov 13, 2014 6:10 pm
by riggeek
Looking thou other people code for the Jeabo DC pump has lead me to a question.

If I use code like what is listed be low. Will I still be able to switch pump modes or will this hard lock the code to what is programmed? Would I need to used some sorta 1 shot to set the mode?

I would like to use short pulse pump mode in the day and constant at night with the refugium light being on as the trigger. As well as a nutrient transport mode after feeding.

part of Sacohen code

// Set timer when in feeding mode
static unsigned long feeding;
if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();

if (now()-feeding<3600) {
// Continue NTM for the 60 minutes
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=NutrientTransport
} else if (now()%SECS_PER_DAY<43200 || now()%SECS_PER_DAY>=79200) { // 12pm / 10pm
// Night mode (go to 30%)
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=Constant;
ReefAngel.DCPump.Speed=30;
} else if (InternalMemory.DCPumpMode_read()==11) {
// Custom Mode and nothing else going on
ReefAngel.DCPump.UseMemory=false;
ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
ReefAngel.DCPump.Mode=modes[rmode]; // Put the mode to the random mode :)
ReefAngel.DCPump.Speed=InternalMemory.DCPumpSpeed_read(); // Set speed from portal
} else {
ReefAngel.DCPump.UseMemory=true; // Will reset all values from memory
}

thanks

riggeek

Re: internal memory

Posted: Thu Nov 13, 2014 6:46 pm
by lnevo
In that code the night and feeding mode trump the portal but it only does the random mode per day when you've selected Custom mode.

Re: internal memory

Posted: Fri Nov 14, 2014 6:12 am
by riggeek
So how would you go about setting the code, but not trumping if it is changed in the portal?


riggeek

Re: internal memory

Posted: Fri Nov 14, 2014 9:46 am
by lnevo
Thats how it is set...