![Smile :)](./images/smilies/icon_e_smile.gif)
![Geek :geek:](./images/smilies/icon_e_geek.gif)
Thanks,
Jon
Try adding this to your setup:Code: Select all
ReefAngel.Timer[FEEDING_TIMER].SetInterval(900);
Code: Select all
//Fast feeder timer
#define FastFeed 105
byte Feed = 0;
....
void setup()
....
void loop()
....
if ((hour() >= 10) || (hour() <= 19)) //from 10a-7p
{
if (minute() ==30 && second() == 0) //once an hour on the half hour
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));
ReefAngel.FeedingModeStart();
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());
}
}
else
{
Feed = 0;
}
....
Code: Select all
ReefAngel.Timer[FEEDING_TIMER].Start();
You are correct. It should not affect the current timer at all. The reason I say this is because of how Start() works. When you call Start(), it computes the end value (aka, Trigger value). Every time you call the function IsTriggered() to determine if the timer is expired/triggered, it just checks the current time against the end time. It never looks at the interval until Start() is called.rimai wrote:I'm not 100% sure, but I think it would not affect the current timer until it resets again or you use the function I posted.
Code: Select all
#define FastFeed 105 //Fast feeder timer
...
byte Feed = 0;
...
// Custom Menu Code
prog_char menu1_label[] PROGMEM = "Feeding";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "pH Calibration";
prog_char menu4_label[] PROGMEM = "pH Detail";
prog_char menu5_label[] PROGMEM = "Temp Detail";
prog_char menu6_label[] PROGMEM = "AutoFeed";
prog_char menu7_label[] PROGMEM = "Flow Cells";
prog_char menu8_label[] PROGMEM = "Version";
prog_char menu9_label[] PROGMEM = "Sound Bytes";
PROGMEM const char *menu_items[] = {
menu1_label, menu2_label, menu3_label,
menu4_label, menu5_label, menu6_label,
menu7_label, menu8_label, menu9_label
};
...
void MenuEntry6() //Autofeeder manual trigger
{
Feed = 1;
ReefAngel.FeedingModeStart();
}
void setup()
{
...
}
void loop()
{
...
//Autofeeder Mode
if ( InternalMemory.read(VacationEnable) <= 2 ) // check for vacation mode
{
// Check if the current time is equal to the start time.
if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStartHr), InternalMemory.read(VacationStartMin))))
{
if (second() == 0)
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.FeedingModeStart();
}
}
else Feed = 0;
}
if ( InternalMemory.read(VacationEnable) == 2 ) // check for vacation mode
{
// Check if the current time is equal to the start time.
if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStart2ndHr), InternalMemory.read(VacationStart2ndMin))))
{
if (second() == 0)
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.FeedingModeStart();
}
}
else Feed = 0;
}
if ( InternalMemory.read(VacationEnable) == 3 ) // check for vacation mode
{
if ((hour() >= 10) || (hour() <= 19)) //from 10a-7p
{
if (minute() ==30 && second() == 0) //once an hour on the half hour
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));
ReefAngel.FeedingModeStart();
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());
}
else Feed = 0;
}
}
...
Code: Select all
#define FastFeed 105 //Fast feeder timer
...
byte Feed = 0;
byte AutoFeed = 0;
...
// Custom Menu Code
prog_char menu1_label[] PROGMEM = "Feeding";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "pH Calibration";
prog_char menu4_label[] PROGMEM = "pH Detail";
prog_char menu5_label[] PROGMEM = "Temp Detail";
prog_char menu6_label[] PROGMEM = "AutoFeed";
prog_char menu7_label[] PROGMEM = "Flow Cells";
prog_char menu8_label[] PROGMEM = "Version";
prog_char menu9_label[] PROGMEM = "Sound Bytes";
PROGMEM const char *menu_items[] = {
menu1_label, menu2_label, menu3_label,
menu4_label, menu5_label, menu6_label,
menu7_label, menu8_label, menu9_label
};
...
void MenuEntry6() //Autofeeder manual trigger
{
AutoFeed = 1;
Feed = 1;
ReefAngel.FeedingModeStart();
AutoFeed = 0;
}
void setup()
{
...
}
void loop()
{
...
//Autofeeder Mode
if ( InternalMemory.read(VacationEnable) <= 2 && Autofeed == 0) // check for vacation mode
{
// Check if the current time is equal to the start time.
if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStartHr), InternalMemory.read(VacationStartMin))))
{
if (second() == 0)
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.FeedingModeStart();
}
}
else Feed = 0;
}
if ( InternalMemory.read(VacationEnable) == 2 && Autofeed == 0) // check for vacation mode
{
// Check if the current time is equal to the start time.
if (NumMins(hour(), minute()) == (NumMins(InternalMemory.read(VacationStart2ndHr), InternalMemory.read(VacationStart2ndMin))))
{
if (second() == 0)
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.FeedingModeStart();
}
}
else Feed = 0;
}
if ( InternalMemory.read(VacationEnable) == 3 && Autofeed == 0) // check for vacation mode
{
if ((hour() >= 10) || (hour() <= 19)) //from 10a-7p
{
if (minute() ==30 && second() == 0) //once an hour on the half hour
{
Feed = 1; // Turn on feeder and feedmode
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.read(FastFeed));
ReefAngel.FeedingModeStart();
ReefAngel.Timer[FEEDING_TIMER].SetInterval(InternalMemory.FeedingTimer_read());
}
else Feed = 0;
}
}
...