Skip to content

Releases: KravitzLabDevices/FED3_library

minor bug fix

24 Aug 18:34
59d1883
Compare
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
Compare
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
Compare
Choose a tag to compare
v1.16.1

Update FED3.h

Version 1.16.0

06 Aug 20:10
Compare
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
Compare
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
Compare
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

updated library naming

16 Jul 02:11
181e408
Compare
Choose a tag to compare

fixed version number in fed3.h file

Minor tweak

15 Jul 21:24
74daba7
Compare
Choose a tag to compare

Change dependency to SdFat - Adafruit Fork

FED3 library v1.13.0

15 Jul 18:02
cb57815
Compare
Choose a tag to compare

New feature:
Added a stopTone() function to stop a tone immediately, ie: if you start a 10s tone but want it to terminate early due to nosepoke, etc. useage:
stopTone();

Minor bug fixes:
Fixed RandomRatio example to be truly random by randomizing the randomseed in setup
Removed some stray serial.print functions from the library
Fixed a char warning about "filename" that popped up during flashing

FED3 library v1.12.0

12 Mar 15:46
Compare
Choose a tag to compare

New features:

  • Added "currentMinute" variable to return the current minute from the RTC for use in behavioral scripts. Used like prior currentHour variable.
  • Added new function "fed3.pulseGenerator(pulse_width, frequency, repetitions) for more advanced pulse train output than the prior fed3.BNC function
  • Added new example program "Optogenetic_Self_Stim" to demo how to use the new pulseGenerator function
  • Added new "Random Ratio" example program to demo how to use the Arduino random function within FED3 scripts to randomize things. Tested by Claire Foldi, thanks!

Bug fix:

  • FED3 will no longer log anything for "Motor_Turns" on Poke events. Thanks Hamid Taghipour!