how to: wavemakers off overnight?

Do you have a question on how to do something.
Ask in here.
Post Reply
bigHUN
Posts: 96
Joined: Sat Dec 03, 2011 9:41 pm

how to: wavemakers off overnight?

Post by bigHUN »

how to code the wavemakers turn on and cycle about the time as the daylight, or similar setting?
I have the main return pump and a closed circuit pump running all time (port8), and the wavemakers on 5-6 may not need to steer overnight?
but again, at feeding time or waterchange time go off as it is now by default.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: how to: wavemakers off overnight?

Post by rimai »

Which port do you have your daylights?
Roberto.
bigHUN
Posts: 96
Joined: Sat Dec 03, 2011 9:41 pm

Re: how to: wavemakers off overnight?

Post by bigHUN »

#define Port6 6 // Wavemaker 2
#define Port5 5 // Wavemaker 1
#define Port4 4 // Standard Lights 2
#define Port3 3 // Standard Lights 1
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: how to: wavemakers off overnight?

Post by rimai »

You can use something like this:

Code: Select all

  if (ReefAngel.Relay.Status(Port3))
  {
    ReefAngel.Wavemaker1(Port5);
    ReefAngel.Wavemaker2(Port6);

  }
  else
  {
    ReefAngel.Relay.Off(Port5);
    ReefAngel.Relay.Off(Port6);
  }
Roberto.
bigHUN
Posts: 96
Joined: Sat Dec 03, 2011 9:41 pm

Re: how to: wavemakers off overnight?

Post by bigHUN »

what that means:
AtilaFinal:136: error: expected unqualified-id before 'if'
AtilaFinal:142: error: expected unqualified-id before 'else'
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: how to: wavemakers off overnight?

Post by rimai »

It's probably that you are trying to place the code above in the wrong place.
Make sure you paste inside the loop() brackets.
Roberto.
Post Reply