mikediamond45
Hello,
I am using MedPC & I would like to know if there is any way to get the current state of a lever?
That is, I would like to know how long a mouse depresses a lever?
For example, I will only give reward if the mouse presses the lever for >= 5 seconds.
^Lever = 1
^Reward = 2
S.S.1,
S1,
0.01": SET M = 0 ---> S2
S2,
#R^Lever: ADD M; SHOW 1, Counter, M;
If (M >= 5) AND (output state of ^Lever = pressed) [@True, @False]
@True: ON ^Reward ---> S3
@False: ---> SX
S3,
1": OFF ^Reward; SET M = 0 ---> S2
Is there any code that I can substitute for (output state of ^Lever = pressed) ?