daniella3d wrote:so is it possible to reproduce the ''else'' mode of the wp25 with the reef angel?
else: reef stream mode, a random flow cycle that randomly increases and decreases pump speed and duration. This creates a random flow cycle similar to what you would find in a natural reef.
Also do I need to put the whole code in there ? like if I want to use the reef crest mode, do I need to put this code in?
------------------
byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)
{
static unsigned long lastwavemillis=millis();
static int newspeed=WaveSpeed;
if ((millis()-lastwavemillis) > 5000)
{
if (random(100)<50) newspeed--; else newspeed++;
newspeed=constrain(newspeed,WaveSpeed-WaveOffset,WaveSpeed+WaveOffset);
newspeed=constrain(newspeed,0,100);
lastwavemillis=millis();
}
if (PulseSync)
return newspeed;
else
return WaveSpeed-(newspeed-WaveSpeed);
}
-----------------
or do I just need this?
------------------
ReefAngel.PWM.SetDaylight( ReefCrestMode(60,20,true) ); // ReefCrest at 60% +/- 20% on sync mode
------------------
or do I need to put both? I am a little lost as to what to use and where to put it?
thanks.
You just need
Code: Select all
ReefAngel.PWM.SetDaylight( ReefCrestMode(60,20,true) ); // ReefCrest at 60% +/- 20% on sync mode
the rest has been added to the libraries.
If you want the pump faster or slower you would change the 60
If you want the frequency of the wave different change to 20
WaveSpeed - % for average speed
WaveOffset - Max offset of speed in which the mode will go up/down from average speed
PulseSync - true if you want to sync pumps to same cycle. one false and one true if you want to anti-sync pumps.