Forum Software Ferduino code Night mode similar to the pumps Vortech

Night mode similar to the pumps Vortech


Post Number:#1 Post Sun May 03, 2015 4:13 am
Posts: 20
Topics: 4
Images: 0
Solve rating: 0
Joined: Sun Apr 19, 2015 2:35 pm
Topics: 4
Age: 46
Gender: None specified
National Flag:
Italy
Hi

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

  int value = 0;
  long times = millis();
  boolean notturno=false;
  if(modo_selecionado == 1)
  {


after replace all this part

else if(modo_selecionado == 5)
{
 Pump1PWM = Pump1PWM_temp;
 Pump2PWM = Pump2PWM_temp;
}
  analogWrite(wavemaker1, Pump1PWM);
  analogWrite(wavemaker2, Pump2PWM);
}


with this

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



Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron