reefangel.standardlights question

Do you have a question on how to do something.
Ask in here.
Post Reply
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

reefangel.standardlights question

Post by Meshmez »

I know that ReefAngel.StandardLights(Port3,30) will turn port 3 on 30 min before the standard light timer, and turn it off 30 minutes after. If i put in a negative value for the offset will it do the opposite? for instance if my standard light on time is 12:00, would ReefAngel.StandardLights(Port3,-30) turn port 3 on at 12:30?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: reefangel.standardlights question

Post by rimai »

I think so, but never tried.
The logic says it is possible.
Can you try and report if it works?
Roberto.
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: reefangel.standardlights question

Post by Meshmez »

doesnt seem to work. im not sure if it is because i already had the lights on (standard lights start time has already passed). I set the offset according to a time in the future, when i uploaded it left the port on, and nothing happened when it rolled through the "offset" time
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: reefangel.standardlights question

Post by rimai »

Upon futher review, you are correct.
It won't work. The definition says byte for offset value.

Code: Select all

void StandardLights(byte Relay, byte MinuteOffset);
Byte numbers can only be positive.
Why not use the other way around instead?
Use Port3 as StandardLights and whatever other port as StandardLights with offset.
Wouldn't it work for you?
Roberto.
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: reefangel.standardlights question

Post by Meshmez »

Ya, I can make it work that way. For what im using it for I have 3 different sets of lights coming on and i already had it coded to do the first 2 with the second being the "middle" of the 3, and i wanted that to coincide with my set times. but its no big deal, Just figured if it worked this way it would be easier, in reality im just being lazy :)
Post Reply