Red Sea Max 500
Red Sea Max 500
I have an iPhone. We need a primer with all the http commands
I tried to look at the cpp file the other day but couldn't make heads or tails.
I tried to look at the cpp file the other day but couldn't make heads or tails.
Re: Red Sea Max 500
Check this out: http://forum.reefangel.com/viewtopic.php?f=7&t=1541lnevo wrote:I have an iPhone. We need a primer with all the http commands
I tried to look at the cpp file the other day but couldn't make heads or tails.
Re: Red Sea Max 500
Can we get a value from MoonPhaseLabel instead of MoonPhase()? I tried without any luck.
Instead of the raw number, if the Label is 'Full Moon' I'd like my other LED moonlights to be on with the dimmable lights.
Instead of the raw number, if the Label is 'Full Moon' I'd like my other LED moonlights to be on with the dimmable lights.
Re: Red Sea Max 500
Nothing? No MoonPhaseLabel function?
Currently I have it set for >70. But I'm not sure if that will always be around the value for full moon.
Currently I have it set for >70. But I'm not sure if that will always be around the value for full moon.
Re: Red Sea Max 500
The math is tricky and I know I'm having trouble reading it... but it seems the result from MoonPhase should be able to tell you if it's full moon or not. I just don't know where the cut off is
Maybe someone who can read the math better can tell you what the minimum "Full Moon" value is...
I can't paste you the custom function while I'm at work but basically I would change the function from char *MoonPhaseLabel() to int isFullMoon() and then in the if block toward the bottom, I would replace the return "Full Moon" to return 0 and make the rest an else return 1. Then you could do an if (isFullMoon()) Turn on my lights;
Here's the code for the MoonPhaseLabel() function
http://www.easte.net/RA/html/_globals_8 ... tml#l00135
I can help you with the code replacement later tonight if you need assistance...
Maybe someone who can read the math better can tell you what the minimum "Full Moon" value is...
I can't paste you the custom function while I'm at work but basically I would change the function from char *MoonPhaseLabel() to int isFullMoon() and then in the if block toward the bottom, I would replace the return "Full Moon" to return 0 and make the rest an else return 1. Then you could do an if (isFullMoon()) Turn on my lights;
Here's the code for the MoonPhaseLabel() function
http://www.easte.net/RA/html/_globals_8 ... tml#l00135
I can help you with the code replacement later tonight if you need assistance...
Re: Red Sea Max 500
So the full moon value changes from full moon to full moon? I think last full moon was around 76 at the peak. I figured it would be 100 each full moon peak.
Basically I have some dark spots in the tank, so when its a full moon, I want my stock moonlights on for the whole night.
I think I will need help with the code. I am guessing I'd have to change the date to a full moon date to do the testing without waiting for the next full moon.
Basically I have some dark spots in the tank, so when its a full moon, I want my stock moonlights on for the whole night.
I think I will need help with the code. I am guessing I'd have to change the date to a full moon date to do the testing without waiting for the next full moon.
Re: Red Sea Max 500
The value doesn't change. But there isn't "one" value for a full moon. The MoonPhaseLabel function looks at the calculation in variable V and if it's between a range then it says "Full Moon" The problem is I don't know what the equates to when it's in the MoonPhase function which returns 0-255 (or 0-100%) for the PWM port...
If you can read the function and figure out the math then the number should be clear...
Otherwise we can modify the moonphase lablel function to just return true or false if it's a Full Moon or not. And you can use that result to decide whether to turn on the lights or not. If you want to use MoonPhase which would be the easiest way, we just need to figure out what values make the lable function return "Full Moon"
If you can read the function and figure out the math then the number should be clear...
Otherwise we can modify the moonphase lablel function to just return true or false if it's a Full Moon or not. And you can use that result to decide whether to turn on the lights or not. If you want to use MoonPhase which would be the easiest way, we just need to figure out what values make the lable function return "Full Moon"
Re: Red Sea Max 500
You can also just change the dates back to before it was full moon and see what the number was when it switches the label... that would probably be the quickest method. 70 will probably be a good number. Personally, I would leave it at 70 for now and next time your RA switches to "Full Moon" you can see what the value is and change your code. One thing to keep in mind is that Full Moon is not just one night... so you may actually want to leave 70 as that may be when the moon is fullest..
Re: Red Sea Max 500
OK, tested the full moon value last night. The lowest value with the label being full moon is 69. So that's what I set it to. Waiting for the 24 to arrive so I can see if it's working properly.
Re: Red Sea Max 500
ok, so the moonphase thing really isn't working right. If I let the light schedule go on its own the moonphase statement comes on at 12am. But it should be on at 10p. If I manually toggle box1_port4 on and then auto, it comes on. I think its just the change over from the RSM Evening line.
Code: Select all
// RSMLED Moonlight Schedule
if (hour()>=6 && hour()<=10) ReefAngel.StandardLights( Box1_Port4,6,0,10,0 ); //RSMLED Morning 6a-10a
else if(hour()>=20 && hour()<=22) ReefAngel.StandardLights( Box1_Port4,20,0,22,0 ); //RSMLED Evening 8p-10p
else if(hour()>=22 || hour()<=4) if (MoonPhase()>=69) ReefAngel.StandardLights( Box1_Port4,22,0,4,0 ); //RSMLED on for Full Moon 10p-4a
Re: Red Sea Max 500
Did the original code I posted work?
You cannot leave a gap in the hours or you will need to add another "else" statement to complete the unused hours.
Also, if the hour is 22, you have 2 valid options and the last one is the one that will be higher priority.
You cannot leave a gap in the hours or you will need to add another "else" statement to complete the unused hours.
Also, if the hour is 22, you have 2 valid options and the last one is the one that will be higher priority.
Roberto.