Go Down

Topic: Salt Reef seasons IF Then Confusion!? (Read 2865 times) previous topic - next topic

AWOL

Code: [Select]
if((hours=<18 && minutes==00)||(hours=>6&&minutes==00)||(hours=>7&&hours=<17);
digitalWrite(fan, HIGH);
{
    else
}
digitalWrite(fan,LOW);

That's a novel use of "else".
I'd be surprised if that compiles, and the semicolon at the end of the "if" would render it useless anyway.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Nick Gammon

Google: c tutorial if statement

There are about 3, if not 4, things wrong with the way you have done that. A tutorial will help you out there. There are some nice YouTube ones too.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

djjester611

Sorry its been so long but I have been searching and still cannot find what I'm looking for. I have come across time based tasks but with no RTC and one other issue I have come across I need pumps alternating every 15 mins or 900000 Millis but after reading milliseconds doesn't go that high .  I'm sorry but I feel hopeless.  Everyone else's aquarium. Controllers are set up recalling last time intervals

AWOL

Quote
900000 Millis but after reading milliseconds doesn't go that high

Where did you read that?
It goes way higher than that.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

djjester611

How high value do that actually go

Nick Gammon

4294967295 milliseconds (49.71 days)
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up