Re: Check if feeding mode is active
Posted: Sun Jun 02, 2013 3:09 pm
Here's a piece of code that you can use:
Place this code inside your loop() function. This will check if you are in Feeding mode and if you are, it sets the PWM Actinic channel to 0% otherwise it puts it at 100%. You can obviously change those to do whatever you want, but that's a skeleton for you.
If you want to check for water change mode, just use "WATERCHANGE_MODE" instead of "FEEDING_MODE".
If you search the forum for either of those 2 phrases, you will find lots of examples.
Code: Select all
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) {
ReefAngel.PWM.SetActinic(0);
} else {
ReefAngel.PWM.SetActinic(100);
}
If you want to check for water change mode, just use "WATERCHANGE_MODE" instead of "FEEDING_MODE".
If you search the forum for either of those 2 phrases, you will find lots of examples.