Timeout function doesn't work

26 views
Skip to first unread message

Nachi Kamatkar

unread,
Sep 10, 2022, 11:50:01 AM9/10/22
to FEDforum
Hello everyone,
Just upgraded to a macbook air this week and the FED system is now giving me some issues.
The 'fed3.timeout' function doesn't seem to work during the Free Feeding task. Here's the code;

#include <FED3.h>                                       //Include the FED3 library
String sketch = "FreeFeed";                             //Unique identifier text for each sketch (this will show up on the screen and in log file)
FED3 fed3 (sketch);                                     //Start the FED3 object
int Delay_start = 10;                                   //delay start

void setup() {
 
  fed3.begin();                                         //Setup the FED3 hardware
  fed3.DisplayPokes = false;                            //Customize the DisplayPokes option to 'false' to not display the poke indicators
  fed3.Timeout (Delay_start);                           //(overnight) delay before task begins
  fed3.timeout = 35;                                    //set a timeout after each pellet is taken
 
}

void loop() {
 
  fed3.run();                                           //Call fed.run at least once per loop
  fed3.Feed();                                          //Drop pellet
 
}


Attached, you can see all the libraries I have, which is a complete list I believe. Just downloaded today, so i believe they are up-to-date.

Thanks for your help!

Best,
Nachi

Screen Shot 2022-09-10 at 11.47.07 AM.png

Lex

unread,
Sep 10, 2022, 12:07:33 PM9/10/22
to Nachi Kamatkar, FEDforum
Thanks for pointing this out!  

The feed() function used to call fed3.Timeout automatically, but I removed that in a recent library update.

Can you try adding the line:
fed3.Timeout(35);
after fed3.Feed()

And see if that fixes it? I'll make this clearer in the next update!





--
You received this message because you are subscribed to the Google Groups "FEDforum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedforum+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fedforum/922927c6-ac8e-4e77-88ee-989068867485n%40googlegroups.com.

Nachi Kamatkar

unread,
Sep 10, 2022, 12:40:06 PM9/10/22
to Lex, FEDforum
Thanks Lex! That did the trick! 
Take care,
Nachi
Reply all
Reply to author
Forward
0 new messages