Welcome! Log In Create A New Profile

Advanced

Restrict touch outside, while holding task object

Posted by Jhilik Das 
Restrict touch outside, while holding task object
August 21, 2019 09:20AM
Hello Sir,
I am trying to set up a task where monkey needs to touch and hold an object. While initiating the trial if he touches outside, I am able to abort the trial (using "~touchtarget").

I also want to abort the trial if while holding, he touches out side.
I am trying this code:

taskObject = 1; % a circular object
holdRadiusDva = 3;
holdButtonPeriod = 1000;

[onTarget, rt] = eyejoytrack('releasetarget', taskObject, holdRadiusDva, '~touchtarget', taskObject, holdRadiusDva, holdButtonPeriod);

I was expecting onTarget(1,2)== 1, if I make outside touch while holding.

Current scenario is (when I am touching outside):
1. If I hold for holdButtonPeriod, while keep touching outside, onTarget = [1,0];
2. If I release Hold before holdButtonPeriod, while touching outside, onTarget = [0,1];

I want to find onTarget = [1,1]; and abort those trials.

Thanks in advance for your time,
Jhilik Das.
Re: Restrict touch outside, while holding task object
August 21, 2019 01:03PM
Your touchscreen should be multitouch-enabled and you need to configure your NIMH ML to take at least 2 simultaneous touches.

Attachments:
open | download - multitouch.png (13.7 KB)
Re: Restrict touch outside, while holding task object
August 22, 2019 02:37PM
Thank you so much, Sir.
This works perfectly now.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.