Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
PeterK

Junior Member
Registered:
Posts: 5
Reply with quote  #1 
Hi ML Gurus,

We want to be able to record a left or right button press (or both), from trial start, to trial end. In other words, we want to be able to record early and late button presses, and also want to be able to record correct presses, i.e. those that happen during cue presentation.

I am still waiting for hardware, so it's a little hard to test all this, but I figured we could get a head start by drafting code before we're actually able to so.

I have a couple questions about the use of buttons and eyejoytrack(acquiretouch...

     1) how can we "listen" for two buttons simultaneously, by giving button_1 and button_2 arguments on the same line? If not:
     2) do we need to give two separate eyejoytrack(acquiretouch... commands, will it effectively "listen" for both if they are on subsequent lines?
     3) does the function "listen" continuously for button presses?
     4) will it register repetitive button presses, or is it only effective once? If this is the case, does it exit and no longer "listen"? And then what, we need to re-initiate the command again?
     5) how can we turn a cue off when a button is pressed (during the given duration), prior to end of duration, i.e. a correct press?


Thanks,

Peter
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #2 
You don't need hardware for testing. Run your script in the simulation mode. See the "Stating NIMH MonkeyLogic" section in the following link.

https://www.nimh.nih.gov/labs-at-nimh/research-areas/clinics-and-labs/ln/shn/monkeylogic/getting-started-with-nimh-monkeylogic.shtml

The answers for your questions are in the online manual.

http://www.brown.edu/Research/monkeylogic/timingscripts.html#eyejoytrack

My short answers are:

    1) Yes, by giving button_1 and button_2 arguments on the same line.
    2) No, each eyejoytrack will "listen" to one target at a time
    3) It will continuously listen until a button is pressed.
    4) Effectively once. It exits and no longer listen.
    5) call toggleobject().

If you program with NIMH ML's new runtime, you can detect more complex patterns, but what eyejoytrack() checkes is a simple push or hold.
0
PeterK

Junior Member
Registered:
Posts: 5
Reply with quote  #3 
Thanks Jaewon,

I know about simulation mode, but does a key press utilize eyejoytrack(acquirefix... the exact same way a button press on +5V input would?

If eyejoytrack(acquirefix... works once and exits, how do you "listen" for more presses?

I want to record the times of any and all potential button presses, whether they be early (before cue), during cue, or late, after cue off.

It seems like eyejoytrack(acquirefix...is a messy way to do that, since it seems like it must be utilized in the timing script for each potential press. How many presses / how many eyejoytrack(acquirefix... commands?

Is there an alternative; to continuously track a voltage increase, and return an event marker for it, while being able to toggleobjects on and off?
0
Jaewon

Administrator
Registered:
Posts: 689
Reply with quote  #4 
Yes, the exactly same way. From ML's point of view, there is no single difference.

You just have to issue another eyejoytrack() command.

You can continuously track the voltage change and turn on/off stimuli, if you program in NIMH ML's new style, but there is no manual for it yet, other than the following document.

http://forums.monkeylogic.org/post/nimh-monkeylogic-2-with-new-trialholder-v2-9444233?pid=1302994759

If you don't need online analysis, you can just record the whole button signal and analyze it offline.

http://forums.monkeylogic.org/post/saving-full-time-series-for-buttons-as-analog-data-9632146?pid=1303018235
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.