File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ void loop() {
6565 // //////////////////////////////////////////////////////////////
6666 force.readPoke ();
6767 if (force.poke ) {
68+ force.run (true );
6869 trial_start = millis ();
6970 force.Tone ();
7071 trial_available = true ;
@@ -88,7 +89,6 @@ void loop() {
8889 else {
8990 highp_counter = 0 ;
9091 }
91- delay (500 );
9292 if (random (100 ) < prob_left) {
9393 force.Tone ();
9494 force.DispenseLeft ();
@@ -111,7 +111,6 @@ void loop() {
111111 else {
112112 highp_counter = 0 ;
113113 }
114- delay (500 );
115114 if (random (100 ) < prob_right) {
116115 force.Tone ();
117116 force.DispenseRight ();
@@ -135,10 +134,10 @@ void loop() {
135134 // ////////////////////////////////////////////////////////////
136135 // // Finish trial and start inter-trial timeout ////
137136 // ///////////////////////////////////////////////////////////
138- if (trial_available ) {
137+ if (press ) {
139138 press = false ;
140139 trial_available = false ;
141140 force.Timeout (trialTimeout);
142- force.Tone ();
143141 }
142+
144143}
You can’t perform that action at this time.
0 commit comments