Pages: 1 2 [3]   Go Down
Author Topic: Salt Reef seasons IF Then Confusion!?  (Read 2526 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26485
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How else can I rewrite it
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 496
Posts: 19047
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26485
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
900000 Millis but after reading milliseconds doesn't go that high
Where did you read that?
It goes way higher than that.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How high value do that actually go
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 496
Posts: 19047
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

4294967295 milliseconds (49.71 days)
Logged


Pages: 1 2 [3]   Go Up
Jump to: