So how would I code the Nutrient Transport to start when my 10 min Feeding Mode is over and then go back to my Custom Wave ~2 1/2 hours later when the Nutrient Transport is over?
static unsigned long feeding;
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
feeding = now();
ReefAngel.PWM.SetDaylight( 0 );
} else if (now()-feeding<=3600) { // next 60 minutes will be in NTM
ReefAngel.PWM.SetDaylight( NutrientTransportMode(min,max,duration*100,true) );
}
If you are using the new DCPump setup, you will need to set ReefAngel.DCPump.UseMemory=false;
And make sure this code happens AFTER any other settings you may have for the pump or it will get lost.
It is declaring the variable feeding which records the last time feeding mode was active. feeding is an unsigned long which is big enough to hold the number of seconds since 1970. Its static so the variable isn't reinitialized to 0 at the beginning of each loop(). Hope that helps.