From ca47124510bc71fc242fb315b079cb804903e756 Mon Sep 17 00:00:00 2001 From: bamatika <38863767+bamatika@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:05:06 -0500 Subject: [PATCH] Add files via upload Added tone to signal pending reward. --- examples/FORCE/FORCE.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/FORCE/FORCE.ino b/examples/FORCE/FORCE.ino index 7191e6c..623b4e4 100644 --- a/examples/FORCE/FORCE.ino +++ b/examples/FORCE/FORCE.ino @@ -32,8 +32,9 @@ void loop() { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (force.pressLength > force.hold_time) { //if the force lever is held down for longer than the hold_req force.presses++; //keep count of successful presses + if (force.presses == force.ratio) { //if the ratio for number of presses is met - + force.Tone(); //tone signals pending reward //This code block runs only if it's a progressive ratio session if (force.PR == true) { //if it's a progressive ratio session if ((force.trial % force.trials_per_block) == 0) { //if the number of trials_per_block is reached @@ -43,6 +44,7 @@ void loop() { } force.Dispense(); //dispense reward + force.Timeout(force.timeout_length); //timeout (length in seconds) force.presses = 0; //reset presses } else {