Skip to content
Kravitz Lab edited this page Nov 2, 2022 · 15 revisions

This is the FED3 library (beta)

The goal of this library is to abstract most of the housekeeping functions of FED3 smart pellet dispensing device behind the scenes and let the user focus on writing the behavioral control. See the Wiki for documentation on how to use the library. This library is in development, please report bugs using Issues.

Installation instructions

1. Install the Arduino IDE.

2. Add the Adafruit Feather M0 board definitions.

To allow the Arduino IDE to flash the FED3, go to File>Preferences and paste the following link into the field for Additional boards.

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

Arduino Preferences

Then click Tools>Board>Boards Manager and type "Arduino SAMD" in the search bar. Install this, it will take ~5 minutes. Then search for "Adafruit SAMD" and install this as well. Arduino Boards manager

See more details instructions on this step here.

3. Install the FED3 library from the Arduino IDE

Search for the FED3 libary in the Arduino library manager and install the latest version.

Important: When it pops up asking about dependencies click "Install all"

FED3 library manager

4. Set the real time clock (RTC) on the FED3.

Open the "SetClock" example sketch in the Arduino IDE and flash this code to the FED3. You should see a message on the screen with the correct local time, indicating that the RTC was set correctly.
FED3 RTC

5. Flash an example (ClassicFED3 is a good one to start with)

Check out the example FED3 programs by clicking File > Examples > FED3
FED3 examples

6. Start coding!

Check out the functions and variables of the FED3 library to start making custom programs.