follow the directions given by fernendo in a previous post I made a code that makes the night mode similar to so emblazoned Vortech.
during the day the controller carries out the program we selected (1 or 2 or 3 pr 4) and then during the night the two pumps working in continuous mode (both pumps at the same speed) with a power of 45%
This is the code that I created:
add "boolean notturno = false" in this position
Code: Select all
int value = 0;
long times = millis();
boolean notturno=false;
if(modo_selecionado == 1)
{
after replace all this part
Code: Select all
else if(modo_selecionado == 5)
{
Pump1PWM = Pump1PWM_temp;
Pump2PWM = Pump2PWM_temp;
}
analogWrite(wavemaker1, Pump1PWM);
analogWrite(wavemaker2, Pump2PWM);
}
with this
Code: Select all
else if((modo_selecionado == 5)||(notturno==true))
{
Pump1PWM = Pump1PWM_temp;
Pump2PWM = Pump2PWM_temp;
}
if((bled_out == 0) && (wled_out == 0) && (rbled_out == 0) && (rled_out == 0) && (uvled_out == 0))
{
notturno=true ;
Pump1PWM = 255 ;
Pump2PWM = 255 ;
analogWrite(wavemaker1, int(Pump1PWM *0.45));
analogWrite(wavemaker2, int(Pump2PWM *0.45 ));
}
else
{
notturno=false;
analogWrite(wavemaker1, (Pump1PWM ));
analogWrite(wavemaker2, (Pump2PWM ));
}
if you want to increase or decrease the power just change the value 0.45 (45%) with the one wanted 0.5 to 50% of the power, and so on
greetings to all