Skip to content

Get started

Kravitz Lab edited this page Aug 8, 2025 · 4 revisions

Getting Started with FED3

Welcome to the FED3 (Feeding Experimentation Device v3) setup guide! This page walks you through everything you need to get started—from installing software to flashing your first experiment and using the device in the lab.


What You'll Need

  • A FED3 device
  • USB Micro cable
  • Computer (Windows, macOS, or Linux)
  • Internet connection

1️⃣ Install the Arduino IDE

FED3 uses the Arduino IDE to upload code and interact with the device.

Steps:

  1. Download the latest Arduino IDE from the official site: https://www.arduino.cc/en/software
  2. Install it using the default options.
  3. Open Arduino after installation.

2️⃣ Install the Adafruit Board Support Package

FED3 runs on the Adafruit M0 Adalogger, so we need to install its board definitions.

Steps:

  1. In Arduino, go to File > Preferences
  2. Under Additional Boards Manager URLs, paste:
    https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
    
  3. Go to Tools > Board > Boards Manager
  4. Search for Adafruit SAMD and click Install

3️⃣ Select the Correct Board & Port

  1. Go to Tools > Board and select:
    Adafruit Feather M0 (SAMD21)

  2. Plug in your FED3.
    Then go to Tools > Port and select the one that says “Adafruit” or “Feather M0”.

⚠️ If you don’t see the board, try a different USB cable or port.


4️⃣ Install the required Libraries

The FED3 code relies on several Arduino libraries. To install:

  1. Go to Tools > Manage Libraries in the Arduino IDE
  2. Search for the "FED3" library and install it.
{30EFB271-753B-4535-A84E-DB4029F7EB46}
  1. When the Arduino IDE prompts you to install dependency libraries, click yes to install them all

5️⃣ Flash Code to FED3

Once everything is installed:

  1. Click File > Examples > FED3 > Programs to view the Example Programs

  2. Choose the example you want to flash

{6518A309-AA2D-4042-A516-F4E9F07857EA}
  1. Select the board (Adalogger M0) and port again under Tools.

  2. Click the right arrow ▶️ (Upload) button to flash.

✅ You should see Done uploading if everything works.


6️⃣ Set the FED3 Clock (RTC)

FED3 uses a PCF8523 real-time clock to timestamp data. If the date or time is wrong you will need to reset it.

  1. Open `File > Examples > FED3 > SetClock > SetClock
{1AC3194D-876D-4123-92C4-2084402F5F1E}
  1. Upload this example sketch once.

  2. You can then re-upload your FED3 experiment sketch (e.g. FED3_Operant.ino).


7️⃣ Using FED3

Basic Operation

  • FED3 stores data on a microSD card in .CSV format.
  • To start an experiment:
    • Power the device (USB or battery)
    • It will automatically begin running the uploaded sketch

Data Output

  • Each session logs to a new .CSV on the SD card
  • Open in Excel, R, or Python for analysis

Troubleshooting

Check out the Troubleshooting page


Video Tutorials

Check out this YouTube Playlist for setup and usage demonstrations.

Watch Videos


Need Help?

Clone this wiki locally