Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Added tone to signal pending reward.
  • Loading branch information
bamatika authored Jul 27, 2021
1 parent bfea4db commit ca47124
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/FORCE/FORCE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit ca47124

Please sign in to comment.