Hello,
is it possible to setup different time for saturday and sunday for lights on and off?
thx
Different time setup for Weekend?
Different time setup for Weekend?
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Re: Different time setup for Weekend?
Also interested, I have some ideas on how it could be done but hopefully someone already has it done.
Re: Different time setup for Weekend?
There is not currently a simple way to do it yet. There are 2 ways to handle it: 1. hardcode the on/off times for the weekend 2. create your own internal memory values and use those (but not be able to change them via the setup menus only through the wifi interface).Xender wrote:Hello,
is it possible to setup different time for saturday and sunday for lights on and off?
thx
Here is how you would do both:
1. Inside your PDE loop function, you could do this:
Code: Select all
void loop()
{
// ... other functions here
if ( (weekday() == 1) || (weekday() == 7) ) // Sunday or Saturday
{
ReefAngel.StandardLights(Port4, 11, 0, 20, 0); // Weekend schedule
} else
{
ReefAngel.StandardLights(Port4, 8, 0, 18, 0); // Weekday schedule
}
}
Code: Select all
void loop()
{
// ... other functions
if ( (weekday() == 1) || (weekday() == 7) ) // Sunday or Saturday
{
// 0 - on hour, 1 - on minute, 2 - off hour, 3 - off minute
ReefAngel.StandardLights(Port4, InternalMemory.read(0), InternalMemory.read(1), InternalMemory.read(2), InternalMemory.read(3)); // Weekend schedule
} else
{
ReefAngel.StandardLights(Port4); // Weekday schedule (use standard internal memory values)
}
}
You can pick any memory location you want, but i would suggest avoiding the 700-900 range because those ranges already are mostly filled up. I'm planning on using more memory locations for other future stuff too. So if you keep it in the 0 - 200 range, you should be perfectly fine. The locations mentioned above will only be reading a byte. So for the memory reading/writing, you will be using byte storage (which is /mb and only uses 1 block of memory). I would suggest using my status application to update the values as you need to. http://forum.reefangel.com/viewtopic.php?f=8&t=246
Even though I list it as an alpha release, it's still fully functional and works great. I should probably change it to be a Beta release though.
These solutions should both work equally well for you. It just depends on whether you want to have hard coded values or values that you can change easily via the wifi interface. Personally, you will probably want to go with option #2 unless you never want to change the values without uploading new code.
curt
Re: Different time setup for Weekend?
Ok thx curt !
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium