Skip to content

Releases: KravitzLabDevices/FED3_library

version 1.17.3

15 Jan 18:44
07a8b15

Choose a tag to compare

Added slight timing improvements for Psygene project startup menu.

Minor update 1.17.2

04 Aug 19:16

Choose a tag to compare

Small updates top populate headers correctly with Bandit tasks

v1.17.1

05 May 21:00
633c5a6

Choose a tag to compare

Removed lorawan flag in the Bandit example code

Version 1.17.0

17 Mar 17:26
43e7b60

Choose a tag to compare

Almost 2 years since our last release!

Change log:

  1. Updated examples
    From Examples>Programs:
  • Added a new task, "Bandit" (described below)
  • Reorganized examples to include both ProgressiveRatio_Exponential and ProgressiveRatio_PR1.
  • Added "PsyGeneMenu" for a specific project (https://sspsygene.ucsc.edu/)

From Examples>Beta_Programs:

  • Removed GoNogo from Beta_Programs based on user feedback
  • Removed MenuExample2 from Beta_Programs as it was redundant
  1. Added new functionality
  • Updated the Timeout function to include more arguments. It previously only allowed a user to set the duration in seconds, ie: fed3.Timeout(10); It now allows a user to set a "reset" boolean and a "whitenoise" boolearn. These both default to "false", so if they are not set the function will behave as it previously did. If "reset" is set to "true" the Timeout will restart if the mouse pokes again at either poke. If "whitenoise" is set to "true", the FED3 will deliver a white noise stimulus through the entire Timeout.

  • Changed code to accomodate the new "Bandit" task. This code will run a classic "2-armed bandit" task, where probabilities of pellet change on the two pokes (documentation here: https://fed3bandit.readthedocs.io/en/latest/hardware/overview.html). This task requires logging some additional variables such as the probability of pellet on each poke. If "session_type" is set as "Bandit", "Bandit80", or "Bandit100" the code will write these additional headers in the logfile and record their appropriate data: "PelletsToSwitch", "Prob_left", "Prob_right", "High_prob_poke".

  • Added a "jammed" mode which stops trying to dispense pellets after 100 attempts, with the assumption that there is a serious pellet jam that require manual clearing. The FED3 will stop trying to dispense at this point and show "JAMMED... PLEASE CHECK" on the screen. It will need to be reset to dispense again.

  • Only make a new filename when needed. FED3 previously would generate a new filename every time it booted up. We now re-use filenames if they have <2 lines of data in them. This results in a cleaner SD card without so many small files from resetting the device.

  1. Minor changes:
    Added a new variable: fed3.countAllPokes. This defaults to "true", so if you don't change it it acts like prior behavior. But if you set this variable to "false" it will no longer increment pokes during dispense or with pellet in the well. These pokes will still be logged but won't contribute to the LeftCount and RightCount totals on the screen or logfile.

minor bug fix

24 Aug 18:34
59d1883

Choose a tag to compare

added fed3.Timeout(5) to free feeding in classicFED3 script
removed pixelsoff() call from sleep function, as it takes a lot of power to call Neopixels and it's not needed.

Bug fix for free feeding

24 Aug 16:29
95317a8

Choose a tag to compare

This adds a 5s timeout to the free-feeding code by default, to reduce possibility of rapid pellet removals

bug fix for timed feeding

06 Aug 22:41
5ea96c2

Choose a tag to compare

v1.16.1

Update FED3.h

Version 1.16.0

06 Aug 20:10

Choose a tag to compare

Changes:

  1. Logging all pokes! FED3 now logs all pokes, even while FED3 is doing other things like dispensing pellets or in a timeout. To keep the different types of pokes straight in the logfile they are labeled in the "Event" column as:
    Left (The original! This means an active Left poke was detected)
    LeftShort (If you've set a minPokeTime and the duration of the Left poke is not long enough it will still log the short poke - see program example here)
    LeftWithPellet (Left poke with a Pellet in the well)
    LeftinTimeout (Left poke during a timeout)
    LeftDuringDispense (Left poke during dispensing, but before the Pellet has dropped)

These same variables are also logged for Right pokes. And the duration of all pokes are also logged in the "Poke_Time" column.

  1. Control an output voltage pulse when the pellet is removed. The Feed() function now has an optional argument to add an output pulse after the pellet is taken. This is useful for aligning with fiber photometry or other recordings. To send a pulse, give the fed3.Feed() function an optional argument noting the duration of the pulse. Useage:
    Calling fed3.Feed(100) will send a 100ms pulse when the pellet is taken.
    Calling fed3.Feed(500) will send a 500ms pulse when the pellet is taken.
    Calling fed3.Feed() will not send a pulse.

  2. Leaving the Neopixels on throughout the Feed() function. Due to this question from Marie Le May, I added another optional argument to FED3 to not turn the Neopixels off in the Feed functions. Normally, FED3 extinguishes the Neopixels when it detects a pellet. However, if you don't want them to turn off here, you can set a second optional second argument to false in the Feed() function. To do this, you need to set both optional arguments in the Feed() function:
    To leave the pixels on without sending a pulse call fed3.Feed(0, false);
    To leave pixels on with a 100ms pulse call fed3.Feed(100, false);
    And to do neither just call fed3.Feed().

You will need to call fed3.pixelsOff() to turn them off in this case. You also have to call fed3.disableSleep() in your setup loop if you plan to leave the Neopixels on for long durations, as their power will be cut when sleep modes are enabled.

  1. Set the FED3 clock without reflashing! The FED3 has an internal real-time clock chip called the PCF8523. Unfortunately this clock does not have high precision and can drift a couple seconds per week, which adds up over time. You can flash the SetClock script (in the FED3 Examples) to re-set the clock to your computer's local time, but this requires re-flashing the device. I've now added a simple way to adjust the clock on the device itself. At startup, hold both pokes while the mouse is running across the screen. This will enter a small settings menu, where you can first set the number of the device with the Left and Right pokes. Once the device number is set, wait 3s and it will switch to a clock adjust mode. Here, the pokes will let you set the time forwards or backwards. When you're happy just wait and the FED3 will reset itself, keeping the new time.

Release 1.15.0

06 Aug 14:38
74baec7

Choose a tag to compare

New feature:
Added logging for pokes during dispensing

Bug fix:
Fixed Timeout display to stop text blinking

Library v1.14.0

05 Aug 12:35
565e327

Choose a tag to compare

This update includes the following new functionality:

  1. New example in Examples>FunStuff for how to change tone volume (it's a hack but it works!)
  2. Updated Timeout() function to log pokes during Timeout
  3. Updated power handling code to allow NeoPixels to remain on for long durations when Sleep modes are disabled