Skip to content

KravitzLabDevices/FED4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FED4 Library

An Arduino library for the Feeding Experimentation Device version 4 (FED4), an open-source device for rodent behavioral experiments.

Getting Started

Meta Data Configuration File (meta.json)

The SD card should include a meta.json file containing metadata for the device. We use bblanchon/ArduinoJson to parse the JSON file. This format is compatible with https://hublink.cloud. Here is the base schema:

{
    "subject": {
        "id": "mouse001",
        "strain": "C57BL/6",
        "sex": "male"
    },
    "fed": {
        "program": "Classic"
    },
    "hublink": {
        "advertise": "FED4",
        "advertise_every": 300,
        "advertise_for": 30,
        "disable": false
    }
}

These meta data will be parsed in Arduino and other languages as well for post-analysis. Other JSON resources:

Here are some common uses with FED4:

String subjectId = getMetaValue("subject", "id"); // within library
String subjectId = fed.getMetaValue("subject", "id"); // within sketch

Creating a meta.json file

You can create a meta.json file in most terminals using:

cd /path/to/your/SD
echo '{"subject":{"id":"mouse001","strain":"C57BL/6","sex":"male"},"fed":{"program":"Classic"}}' > meta.json

Dependencies

This library requires several Arduino libraries for hardware interfacing. See FED4.h for a complete list of dependencies.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

For more information about the FED project, visit https://github.com/KravitzLab

Releases

No releases published

Packages

No packages published