Send markers to the eye-tracker through everytime a response is made


Send markers to the eye-tracker through everytime a response is made...
Author
Message
nidhi_desai
nidhi_desai
New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)New Member (45 reputation)
Group: Forum Members
Posts: 8, Visits: 57
Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using <port> for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another <trial> everytime a button is pressed, but is there a better and less cumbersome solution to this?
Dave
Dave
Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)Supreme Being (893K reputation)
Group: Administrators
Posts: 10K, Visits: 63K
nidhi_desai - 1/12/2021
Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using <port> for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another <trial> everytime a button is pressed, but is there a better and less cumbersome solution to this?

You can send the marker via /responsemessage and you can have a trial accept multiple responses by implementing /stop logic.

https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm

For the sake of example, assume you want to allow an unlimited number of pressing either the E or I key for a duration of 10 seconds:

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ stop = [
    trial.mytrial.elapsedtime >= 10000;
]
/ stimulustimes = [0=clearscreen,mytext]
/ validresponse = ("E", "I")
/ responsemessage = ("E", Epress, 100)
/ responsemessage = ("I", Ipress, 100)
</trial>

<text mytext>
/ items = ("Press the E and I keys. You have 10 seconds.")
/ erase = false
</text>

<text Epress>
/ items = ("Pressed E")
/ position = (50%, 90%)
</text>

<text Ipress>
/ items = ("Pressed I")
/ position = (50%, 90%)
</text>


Every time one of the keys is pressed, the respective /responsemessage is triggered. Here, it just displays a <text> on the screen, but you can just as well send a <port> signal via /responsemessage attributes.

Edited 4 days ago @ 10:09 AM by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search